tools: refactor tool call parsing and enable streaming (#10415)

This commit is contained in:
Parth Sareen
2025-05-23 14:19:31 -07:00
committed by GitHub
parent 884d26093c
commit e8b981fa5d
27 changed files with 1868 additions and 340 deletions

30
tools/testdata/tools.json vendored Normal file
View File

@@ -0,0 +1,30 @@
[
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"format": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
],
"description": "The temperature unit to use. Infer this from the user's location."
}
},
"required": [
"location",
"format"
]
}
}
}
]