You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a custom tool. The problem is that sometimes it can run the tool and sometimes it raises a problem with the input. I don't understand why such behaviour. Thanks for helping.
I encountered an error while trying to use the tool. This was the error: Arguments validation failed: 1 validation error for MyCustomToolSchema
argument
Input should be a valid string [type=string_type, input_value={'description': 'My perio...r only?', 'type': 'str'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/string_type.
Tool data retreiver accepts these inputs: Tool Name: data retreiver
Tool Arguments: {'argument': {'description': None, 'type': 'str'}}
this is my tool :
class MyCustomTool(BaseTool):
name: str = "data retreiver"
description: str = (
"This tool searches for the most relevant answers given the question."
)
def _run(self, argument: str) -> str:
# Implementation goes here
url = "some private url"
headers = {
'x-api-key': "private"}
response = requests.get(url, headers=headers).json()
response = response['data']
response = [r['answer'].replace("\n","") for r in response]
return response
The text was updated successfully, but these errors were encountered:
Hello,
I am creating a custom tool. The problem is that sometimes it can run the tool and sometimes it raises a problem with the input. I don't understand why such behaviour. Thanks for helping.
this is my tool :
The text was updated successfully, but these errors were encountered: