Replies: 3 comments
-
Hello there, @olevanss! I'm here to help with any bugs, questions, or contributions you might have. Let's squash those bugs together! 😄 To resolve the issue of incorrect parsing of input parameters when using a custom tool with more than one input parameter in a ReAct agent with LangChain, you need to ensure that the prompt template correctly handles multiple input parameters for the tools. Here's how you can modify your code to handle this:
By ensuring that the prompt template, tools, and agent executor are correctly set up to handle multiple input parameters, you can resolve the issue of incorrect parsing of input parameters in a ReAct agent with LangChain [1][2]. |
Beta Was this translation helpful? Give feedback.
-
UPD: UPD2: |
Beta Was this translation helpful? Give feedback.
-
any solution for this? The tool calling agent works fine but the react agent cannot call custom tools in javascript |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
The problem
I am trying to build react agent with custom tools. I encounter problems every time I try to use tool with more than 1 input parameter.
Agent tries to provide input for custom tool, but it is parsed incorrectly (as a single string object, as far as I tested).
I would appreciate a piece of advice here.
The exact error I get is the following:
pydantic.v1.error_wrappers.ValidationError: 2 validation errors for Metrics
To calculate the percentage difference between 5 and 7, I will use the
perc_diff
function.Action: perc_diff
Action Input: (5, 7)num1
value is not a valid float (type=type_error.float)
num2
field required (type=value_error.missing)
System Info
System Information
Package Information
Packages not installed (Not Necessarily a Problem)
The following packages were not found:
Beta Was this translation helpful? Give feedback.
All reactions