This commit is contained in:
Harrison Chase
2022-12-10 23:58:02 -08:00
parent aacd417076
commit 81383474c4
6 changed files with 29 additions and 13 deletions

View File

@@ -56,7 +56,7 @@ def test_predict_until_observation_normal() -> None:
Tool("Lookup", lambda x: x),
]
agent = ReActDocstoreAgent.from_llm_and_tools(fake_llm, tools)
output = agent.get_action("")
output = agent.get_action("", {"input": ""})
assert output.log == outputs[0]
assert output.tool == "Search"
assert output.tool_input == "foo"
@@ -71,7 +71,7 @@ def test_predict_until_observation_repeat() -> None:
Tool("Lookup", lambda x: x),
]
agent = ReActDocstoreAgent.from_llm_and_tools(fake_llm, tools)
output = agent.get_action("")
output = agent.get_action("", {"input": ""})
assert output.log == "foo\nAction 1: Search[foo]"
assert output.tool == "Search"
assert output.tool_input == "foo"