From ca85d83df03a25a21c00e5b65c275c595d7204a5 Mon Sep 17 00:00:00 2001 From: cronoik-inceptionai Date: Wed, 2 Jul 2025 16:24:35 +0400 Subject: [PATCH] mapping back to function from response --- docs/features/tool_calling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: