Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5_agents_and_tools/agent_deep_dive/1_agent_react_chat.py #2

Open
stutimishra7 opened this issue Jul 16, 2024 · 3 comments
Open

5_agents_and_tools/agent_deep_dive/1_agent_react_chat.py #2

stutimishra7 opened this issue Jul 16, 2024 · 3 comments

Comments

@stutimishra7
Copy link

User: what is the time

Entering new AgentExecutor chain...
Action:

{
  "action": "Time",
  "action_input": {}
}

ToolException Traceback (most recent call last)
in <cell line: 87>()
94
95 # Invoke the agent with the user input and the current chat history
---> 96 response = agent_executor.invoke({"input": user_input})
97 # print(response)
98 print("Bot:", response["output"])

9 frames
/usr/local/lib/python3.10/dist-packages/langchain_core/tools.py in _to_args_and_kwargs(self, tool_input)
723 all_args = list(args) + list(kwargs.values())
724 if len(all_args) != 1:
--> 725 raise ToolException(
726 f"""Too many arguments to single-input tool {self.name}.
727 Consider using StructuredTool instead."""

ToolException: Too many arguments to single-input tool Time.
Consider using StructuredTool instead. Args: []

@stutimishra7
Copy link
Author

Working for Wikipedia

@Jiaqin-Tan
Copy link

It seems to be caused by the LLM update, someone please confirm this.

Also it can be luck based, if the LLM think there is only 1 arg to be passed in, then the code should running fine.

@neerja-1984
Copy link

worked fine for me !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants