mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-24 16:06:22 +08:00
Documentation update tool_calling: mapping back to function from response (#20373)
This commit is contained in:
parent
706ff13224
commit
b95877509b
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user