Enhance API documentation by adding new endpoints for ASR preview, assistant configuration retrieval, and knowledge base management. Update existing assistant and tool definitions for improved clarity and functionality. Remove outdated sections from history records documentation, ensuring a streamlined reference for users.
This commit is contained in:
@@ -16,7 +16,7 @@ AI Video Assistant 提供两种类型的 API:
|
||||
### 基础地址
|
||||
|
||||
```
|
||||
http://localhost:8080/api/v1
|
||||
http://localhost:8000/api/v1
|
||||
```
|
||||
|
||||
### 认证
|
||||
@@ -25,7 +25,7 @@ REST API 使用 Bearer Token 认证:
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: Bearer YOUR_API_KEY" \
|
||||
http://localhost:8080/api/v1/assistants
|
||||
http://localhost:8000/api/v1/assistants
|
||||
```
|
||||
|
||||
### 通用响应格式
|
||||
@@ -74,8 +74,11 @@ curl -H "Authorization: Bearer YOUR_API_KEY" \
|
||||
| GET | /assistants | 获取助手列表 |
|
||||
| POST | /assistants | 创建助手 |
|
||||
| GET | /assistants/{id} | 获取助手详情 |
|
||||
| PATCH | /assistants/{id} | 更新助手 |
|
||||
| PUT | /assistants/{id} | 更新助手 |
|
||||
| DELETE | /assistants/{id} | 删除助手 |
|
||||
| GET | /assistants/{id}/config | 获取引擎配置 |
|
||||
| GET | /assistants/{id}/opener-audio | 获取开场音频状态 |
|
||||
| POST | /assistants/{id}/opener-audio/generate | 生成开场音频 |
|
||||
|
||||
#### 模型管理
|
||||
|
||||
@@ -83,19 +86,48 @@ curl -H "Authorization: Bearer YOUR_API_KEY" \
|
||||
|------|------|------|
|
||||
| GET | /llm | 获取 LLM 模型列表 |
|
||||
| POST | /llm | 添加 LLM 模型 |
|
||||
| PUT | /llm/{id} | 更新 LLM 模型 |
|
||||
| DELETE | /llm/{id} | 删除 LLM 模型 |
|
||||
| POST | /llm/{id}/test | 测试 LLM 连接 |
|
||||
| POST | /llm/{id}/preview | 预览模型输出 |
|
||||
| GET | /asr | 获取 ASR 模型列表 |
|
||||
| POST | /asr | 添加 ASR 模型 |
|
||||
| PUT | /asr/{id} | 更新 ASR 模型 |
|
||||
| DELETE | /asr/{id} | 删除 ASR 模型 |
|
||||
| POST | /asr/{id}/test | 测试 ASR 连接 |
|
||||
| POST | /asr/{id}/preview | 上传音频预览识别 |
|
||||
| GET | /voices | 获取语音列表 |
|
||||
| POST | /voices | 添加语音配置 |
|
||||
| PUT | /voices/{id} | 更新语音配置 |
|
||||
| DELETE | /voices/{id} | 删除语音配置 |
|
||||
| POST | /voices/{id}/preview | 预览声音 |
|
||||
|
||||
#### 知识库管理
|
||||
|
||||
| 方法 | 路径 | 说明 |
|
||||
|------|------|------|
|
||||
| GET | /knowledge-bases | 获取知识库列表 |
|
||||
| POST | /knowledge-bases | 创建知识库 |
|
||||
| POST | /knowledge-bases/{id}/documents | 上传文档 |
|
||||
| DELETE | /knowledge-bases/{id}/documents/{doc_id} | 删除文档 |
|
||||
| GET | /knowledge/bases | 获取知识库列表 |
|
||||
| POST | /knowledge/bases | 创建知识库 |
|
||||
| PUT | /knowledge/bases/{id} | 更新知识库 |
|
||||
| DELETE | /knowledge/bases/{id} | 删除知识库 |
|
||||
| POST | /knowledge/bases/{id}/documents | 上传文档 |
|
||||
| POST | /knowledge/bases/{id}/documents/{doc_id}/index | 索引文档内容 |
|
||||
| DELETE | /knowledge/bases/{id}/documents/{doc_id} | 删除文档 |
|
||||
| POST | /knowledge/search | 搜索知识库 |
|
||||
| GET | /knowledge/bases/{id}/stats | 获取统计信息 |
|
||||
|
||||
#### 工具管理
|
||||
|
||||
| 方法 | 路径 | 说明 |
|
||||
|------|------|------|
|
||||
| GET | /tools/list | 获取内置工具列表 |
|
||||
| GET | /tools/resources | 获取工具资源列表 |
|
||||
| POST | /tools/resources | 创建工具资源 |
|
||||
| PUT | /tools/resources/{id} | 更新工具资源 |
|
||||
| DELETE | /tools/resources/{id} | 删除工具资源 |
|
||||
| GET | /tools/health | 健康检查 |
|
||||
| POST | /tools/autotest | 运行自动测试 |
|
||||
| POST | /tools/test-message | 发送测试消息 |
|
||||
|
||||
#### 历史记录
|
||||
|
||||
@@ -103,7 +135,11 @@ curl -H "Authorization: Bearer YOUR_API_KEY" \
|
||||
|------|------|------|
|
||||
| GET | /history | 获取对话历史 |
|
||||
| GET | /history/{id} | 获取对话详情 |
|
||||
| GET | /history/stats | 获取统计数据 |
|
||||
| POST | /history | 创建通话记录 |
|
||||
| PUT | /history/{id} | 更新通话记录 |
|
||||
| DELETE | /history/{id} | 删除通话记录 |
|
||||
| POST | /history/{id}/transcripts | 添加转写片段 |
|
||||
| GET | /history/{id}/audio/{turn_index} | 获取音频文件 |
|
||||
|
||||
## WebSocket API
|
||||
|
||||
|
||||
Reference in New Issue
Block a user