Update code for tool call

This commit is contained in:
Xin Wang
2026-02-10 16:28:20 +08:00
parent 539cf2fda2
commit 4b8da32787
7 changed files with 676 additions and 91 deletions

View File

@@ -110,6 +110,24 @@ Rules:
}
```
### `tool_call.results`
Client tool execution results returned to server.
```json
{
"type": "tool_call.results",
"results": [
{
"tool_call_id": "call_abc123",
"name": "weather",
"output": { "temp_c": 21, "condition": "sunny" },
"status": { "code": 200, "message": "ok" }
}
]
}
```
## Server -> Client Events
All server events include:
@@ -142,6 +160,8 @@ Common events:
- Fields: `trackId`, `text`
- `assistant.response.final`
- Fields: `trackId`, `text`
- `assistant.tool_call`
- Fields: `trackId`, `tool_call`
- `output.audio.start`
- Fields: `trackId`
- `output.audio.end`