Revamp documentation structure in mkdocs.yml by reorganizing navigation for improved accessibility. Remove outdated content from previous sections and introduce new topics including detailed guides on assistant management, configuration options, and tool integrations. Enhance API reference documentation with comprehensive error codes and WebSocket protocol details. Add new sections for automated testing, data analysis, and knowledge base management, ensuring a cohesive and user-friendly documentation experience.

This commit is contained in:
Xin Wang
2026-03-01 22:38:50 +08:00
parent 6a46ec69f4
commit 2418df80e5
33 changed files with 3664 additions and 693 deletions

View File

@@ -0,0 +1,126 @@
# 快速开始
5 分钟创建你的第一个 AI 助手。
## 概述
本指南将帮助你快速创建一个能够进行语音对话的智能助手。你可以选择通过控制台或 API 两种方式创建。
## 前提条件
- 已部署 AI Video Assistant 服务
- 已配置至少一个 LLM 模型
- 已配置至少一个 TTS 语音
## 选择创建方式
| 方式 | 适用场景 | 复杂度 |
|------|---------|--------|
| [通过控制台](dashboard.md) | 快速体验、可视化配置 | 简单 |
| [通过 API](api.md) | 程序化创建、批量管理 | 中等 |
---
## 方式一:通过控制台创建
### 步骤 1创建助手
1. 登录控制台,进入 **助手管理** 页面
2. 点击 **新建助手**
3. 输入助手名称,如 "客服助手"
### 步骤 2配置提示词
**全局设置** 中配置系统提示词:
```
你是一个友好的客服助手。你的任务是帮助用户解答问题。
要求:
- 保持友好和专业的语气
- 回答要简洁明了
- 如果不确定答案,请如实告知
```
### 步骤 3配置语音
**语音配置** 中:
1. 选择 TTS 引擎
2. 选择合适的音色
3. 调整语速为 1.0
### 步骤 4测试助手
1. 点击 **保存**
2. 点击 **测试** 按钮
3. 输入 "你好,你能做什么?"
4. 验证回复是否符合预期
### 步骤 5发布助手
1. 确认测试通过后,点击 **发布**
2. 复制生成的 `assistant_id`
---
## 方式二:通过 API 创建
### 步骤 1创建助手
```bash
curl -X POST "http://localhost:8080/api/v1/assistants" \
-H "Content-Type: application/json" \
-d '{
"name": "客服助手",
"prompt": "你是一个友好的客服助手。",
"language": "zh-CN",
"temperature": 0.7
}'
```
### 步骤 2配置语音
```bash
curl -X PATCH "http://localhost:8080/api/v1/assistants/{assistant_id}" \
-H "Content-Type: application/json" \
-d '{
"voice": {
"vendor": "aliyun",
"voice_id": "xiaoyun",
"speed": 1.0
}
}'
```
### 步骤 3测试连接
```javascript
const ws = new WebSocket('ws://localhost:8000/ws?assistant_id=YOUR_ASSISTANT_ID');
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'session.start',
audio: {
encoding: 'pcm_s16le',
sample_rate_hz: 16000,
channels: 1
}
}));
};
ws.onmessage = (event) => {
console.log('收到消息:', event.data);
};
```
---
## 下一步
恭喜!你已成功创建了第一个 AI 助手。接下来可以:
- [配置知识库](../customization/knowledge-base.md) - 让助手回答专业问题
- [添加工具](../customization/tools.md) - 扩展助手能力
- [查看 API 文档](../api-reference/websocket.md) - 深入了解协议细节
- [部署到生产环境](../deployment/index.md) - 正式上线