🚨 test(agents_template.py): add openai-multi-functions to the list of agents
🐛 fix(graph.py): change message variable to a dictionary to match the expected input of get_result_and_thought function and update the assertion to check if the result is a dictionary instead of a string
The test for agents_template.py was updated to include the openai-multi-functions agent in the list of agents. This was done to ensure that the test coverage for the agent is complete.
The test for graph.py was updated to change the message variable to a dictionary to match the expected input of the get_result_and_thought function. The assertion was also updated to check if the result is a dictionary instead of a string. This was done to ensure that the test coverage for the function is complete.
This commit is contained in:
parent
7cebb8215f
commit
d069ab5d6d
2 changed files with 4 additions and 6 deletions
|
|
@ -137,6 +137,7 @@ def test_initialize_agent(client: TestClient):
|
|||
"self-ask-with-search",
|
||||
"conversational-react-description",
|
||||
"openai-functions",
|
||||
"openai-multi-functions",
|
||||
],
|
||||
"name": "agent",
|
||||
"type": "str",
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ def test_get_result_and_thought(basic_graph):
|
|||
responses = [
|
||||
"Final Answer: I am a response",
|
||||
]
|
||||
message = "Hello"
|
||||
message = {"input": "Hello"}
|
||||
# Find the node that is an LLMNode and change the
|
||||
# _built_object to a FakeListLLM
|
||||
llm_node = get_node_by_type(basic_graph, LLMVertex)
|
||||
|
|
@ -349,8 +349,5 @@ def test_get_result_and_thought(basic_graph):
|
|||
# now build again and check if FakeListLLM was used
|
||||
|
||||
# Get the result and thought
|
||||
result, thought = get_result_and_thought(langchain_object, message)
|
||||
# The result should be a str
|
||||
assert isinstance(result, str)
|
||||
# The thought should be a Thought
|
||||
assert isinstance(thought, str)
|
||||
result = get_result_and_thought(langchain_object, message)
|
||||
assert isinstance(result, dict)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue