Skip to content

Commit

Permalink
fix xml agent tool input (langchain-ai#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
Konsti-s authored Feb 10, 2024
1 parent f76f547 commit 5adef76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/agent_types/xml_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def call_tool(messages):
# We construct an ToolInvocation from the function_call
tool, tool_input = last_message.content.split("</tool>")
_tool = tool.split("<tool>")[1]
if "<tool_input>" not in _tool:
if "<tool_input>" not in tool_input:
_tool_input = ""
else:
_tool_input = tool_input.split("<tool_input>")[1]
Expand Down

0 comments on commit 5adef76

Please sign in to comment.