diff --git a/docs/features/tool_calling.md b/docs/features/tool_calling.md index 2aeb022d2574..29f4b2300bbe 100644 --- a/docs/features/tool_calling.md +++ b/docs/features/tool_calling.md @@ -53,7 +53,7 @@ Next, make a request to the model that should result in it using the available t tool_call = response.choices[0].message.tool_calls[0].function print(f"Function called: {tool_call.name}") print(f"Arguments: {tool_call.arguments}") - print(f"Result: {get_weather(**json.loads(tool_call.arguments))}") + print(f"Result: {tool_functions[tool_call.name](**json.loads(tool_call.arguments))}") ``` Example output: