Code: Select all
class Input_structure(BaseModel):
expression: str
variable: str
def compute_derivative(expression: str, variable: str) -> str:
...
derivative_tool = Tool.from_function(
func=compute_derivative,
name="derivative",
description="Compute derivative",
args_schema=Input_structure
)
< /code>
Wenn ich dieses Tool wie SO kette bin: < /p>
result = derivative_tool.invoke(('x^2 + 10', 'x'))
< /code>
Ich erhalte den folgenden Fehler: < /p>
ToolException: Too many arguments to single-input tool derivative.
Consider using StructuredTool instead. Args: ['x^2 + 10', 'x']