Commit 693b7531 authored by John Wang's avatar John Wang

fix: agent tool input error

parent 2387f34e
...@@ -106,7 +106,7 @@ class AgentLoopGatherCallbackHandler(BaseCallbackHandler): ...@@ -106,7 +106,7 @@ class AgentLoopGatherCallbackHandler(BaseCallbackHandler):
) -> Any: ) -> Any:
"""Run on agent action.""" """Run on agent action."""
tool = action.tool tool = action.tool
tool_input = json.dumps({"input": action.tool_input} tool_input = json.dumps({"query": action.tool_input}
if isinstance(action.tool_input, str) else action.tool_input) if isinstance(action.tool_input, str) else action.tool_input)
completion = None completion = None
if isinstance(action, openai_functions_agent.base._FunctionsAgentAction) \ if isinstance(action, openai_functions_agent.base._FunctionsAgentAction) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment