Add manual opener tool calls to Assistant model and API

- Introduced `manual_opener_tool_calls` field in the Assistant model to support custom tool calls.
- Updated AssistantBase and AssistantUpdate schemas to include the new field.
- Implemented normalization and migration logic for handling manual opener tool calls in the API.
- Enhanced runtime metadata to include manual opener tool calls in responses.
- Updated tests to validate the new functionality and ensure proper handling of tool calls.
- Refactored tool ID normalization to support legacy tool names for backward compatibility.
This commit is contained in:
Xin Wang
2026-03-02 12:34:42 +08:00
parent b5cdb76e52
commit 00b88c5afa
14 changed files with 806 additions and 74 deletions

View File

@@ -24,7 +24,7 @@
| turn_off_camera | 关闭摄像头 | system | 执行关闭摄像头命令 |
| increase_volume | 调高音量 | system | 提升设备音量 |
| decrease_volume | 调低音量 | system | 降低设备音量 |
| voice_message_prompt | 语音消息提示 | system | 播报一条语音提示消息 |
| voice_msg_prompt | 语音消息提示 | system | 播报一条语音提示消息 |
| text_msg_prompt | 文本消息提示 | system | 显示一条文本弹窗提示 |
| voice_choice_prompt | 语音选项提示 | system | 播报问题并展示可选项,等待用户选择 |
| text_choice_prompt | 文本选项提示 | system | 显示文本选项弹窗并等待用户选择 |