@@ -39,7 +39,7 @@ tool_definition = {
3939}
4040
4141
42- def handle_tool_call (input_data ):
42+ def handle_call (input_data ):
4343 """
4444 Process the tool call with the given input data.
4545
@@ -76,9 +76,9 @@ TOOLS = [
7676]
7777
7878TOOL_HANDLERS = {
79- " bash" : bash.handle_tool_call ,
79+ " bash" : bash.handle_call ,
8080 # ... other handler mappings
81- " my_tool" : my_tool.handle_tool_call , # Add your tool handler here
81+ " my_tool" : my_tool.handle_call , # Add your tool handler here
8282}
8383```
8484
@@ -143,7 +143,7 @@ Follow these functional programming principles:
143143Example of a handler with proper error handling:
144144
145145``` python
146- def handle_tool_call (input_data ):
146+ def handle_call (input_data ):
147147 try :
148148 # Validate required inputs
149149 if " required_param" not in input_data:
@@ -176,7 +176,7 @@ API_KEY = os.getenv("MY_TOOL_API_KEY")
176176BASE_URL = os.getenv(" MY_TOOL_BASE_URL" )
177177
178178# Then check these in your handler:
179- def handle_tool_call (input_data ):
179+ def handle_call (input_data ):
180180 if not API_KEY or not BASE_URL :
181181 return " ❌ Missing required environment variables in .env"
182182
@@ -234,7 +234,7 @@ tool_definition = {
234234 }
235235}
236236
237- def handle_tool_call (input_data ):
237+ def handle_call (input_data ):
238238 if not WEATHER_API_KEY :
239239 return " ❌ Missing WEATHER_API_KEY environment variable"
240240
0 commit comments