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:
83
docs/content/getting-started/configuration.md
Normal file
83
docs/content/getting-started/configuration.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# 配置说明
|
||||
|
||||
## 环境变量
|
||||
|
||||
在项目根目录或 `web` 目录下创建 `.env` 文件:
|
||||
|
||||
```env
|
||||
# API 服务地址
|
||||
VITE_API_URL=http://localhost:8080
|
||||
|
||||
# Gemini API Key(可选)
|
||||
VITE_GEMINI_API_KEY=your_api_key_here
|
||||
```
|
||||
|
||||
## 变量说明
|
||||
|
||||
| 变量 | 必填 | 说明 | 默认值 |
|
||||
|------|------|------|--------|
|
||||
| `VITE_API_URL` | 是 | 后端 API 服务地址 | http://localhost:8080 |
|
||||
| `VITE_GEMINI_API_KEY` | 否 | Google Gemini API 密钥 | - |
|
||||
|
||||
## 后端服务配置
|
||||
|
||||
后端服务使用独立的配置文件,位于 `api/config/` 目录:
|
||||
|
||||
### 数据库配置
|
||||
|
||||
```yaml
|
||||
database:
|
||||
host: localhost
|
||||
port: 5432
|
||||
name: ai_assistant
|
||||
user: postgres
|
||||
password: your_password
|
||||
```
|
||||
|
||||
### Redis 配置
|
||||
|
||||
```yaml
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
db: 0
|
||||
```
|
||||
|
||||
## Engine 服务配置
|
||||
|
||||
Engine 服务配置位于 `engine/config/` 目录:
|
||||
|
||||
### 助手默认配置
|
||||
|
||||
参考 `engine/config/agents/default.yaml`:
|
||||
|
||||
```yaml
|
||||
agent:
|
||||
name: "默认助手"
|
||||
language: "zh-CN"
|
||||
temperature: 0.7
|
||||
max_tokens: 2048
|
||||
```
|
||||
|
||||
## 多环境配置
|
||||
|
||||
### 开发环境
|
||||
|
||||
```env
|
||||
# .env.development
|
||||
VITE_API_URL=http://localhost:8080
|
||||
```
|
||||
|
||||
### 生产环境
|
||||
|
||||
```env
|
||||
# .env.production
|
||||
VITE_API_URL=https://api.your-domain.com
|
||||
```
|
||||
|
||||
## 配置优先级
|
||||
|
||||
1. 命令行参数
|
||||
2. 环境变量
|
||||
3. `.env` 文件
|
||||
4. 默认值
|
||||
55
docs/content/getting-started/index.md
Normal file
55
docs/content/getting-started/index.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# 安装部署
|
||||
|
||||
本章节介绍如何安装和配置 AI Video Assistant 开发环境。
|
||||
|
||||
## 概述
|
||||
|
||||
AI Video Assistant 由以下组件构成:
|
||||
|
||||
| 组件 | 说明 |
|
||||
|------|------|
|
||||
| **Web 前端** | React + TypeScript 构建的管理界面 |
|
||||
| **API 服务** | Python FastAPI 后端服务 |
|
||||
| **Engine 服务** | 实时对话引擎(WebSocket) |
|
||||
|
||||
## 安装步骤
|
||||
|
||||
### 1. 克隆项目
|
||||
|
||||
```bash
|
||||
git clone https://github.com/your-repo/AI-VideoAssistant.git
|
||||
cd AI-VideoAssistant
|
||||
```
|
||||
|
||||
### 2. 安装依赖
|
||||
|
||||
```bash
|
||||
cd web
|
||||
npm install
|
||||
```
|
||||
|
||||
### 3. 配置环境变量
|
||||
|
||||
创建 `.env` 文件,详见 [配置说明](configuration.md)。
|
||||
|
||||
### 4. 启动开发服务器
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
访问 http://localhost:3000
|
||||
|
||||
## 构建生产版本
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
构建产物在 `dist` 目录。
|
||||
|
||||
## 下一步
|
||||
|
||||
- [环境要求](requirements.md) - 详细的软件版本要求
|
||||
- [配置说明](configuration.md) - 环境变量配置指南
|
||||
- [部署指南](../deployment/index.md) - 生产环境部署
|
||||
65
docs/content/getting-started/requirements.md
Normal file
65
docs/content/getting-started/requirements.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# 环境要求
|
||||
|
||||
## 软件依赖
|
||||
|
||||
### 必需软件
|
||||
|
||||
| 软件 | 版本要求 | 说明 |
|
||||
|------|---------|------|
|
||||
| Node.js | 18.0 或更高 | JavaScript 运行时 |
|
||||
| npm/yarn/pnpm | 最新版本 | 包管理器 |
|
||||
| Python | 3.10+ | 后端服务运行环境 |
|
||||
|
||||
### 推荐浏览器
|
||||
|
||||
| 浏览器 | 版本要求 |
|
||||
|--------|---------|
|
||||
| Chrome | 90+ |
|
||||
| Firefox | 90+ |
|
||||
| Edge | 90+ |
|
||||
| Safari | 14+ |
|
||||
|
||||
## 检查环境
|
||||
|
||||
运行以下命令检查已安装的软件版本:
|
||||
|
||||
```bash
|
||||
# 检查 Node.js 版本
|
||||
node --version
|
||||
|
||||
# 检查 npm 版本
|
||||
npm --version
|
||||
|
||||
# 检查 Python 版本
|
||||
python --version
|
||||
```
|
||||
|
||||
## 硬件建议
|
||||
|
||||
### 开发环境
|
||||
|
||||
| 资源 | 建议配置 |
|
||||
|------|---------|
|
||||
| CPU | 4 核心以上 |
|
||||
| 内存 | 8GB 以上 |
|
||||
| 磁盘 | 20GB 可用空间 |
|
||||
|
||||
### 生产环境
|
||||
|
||||
| 资源 | 建议配置 |
|
||||
|------|---------|
|
||||
| CPU | 8 核心以上 |
|
||||
| 内存 | 16GB 以上 |
|
||||
| 磁盘 | 100GB SSD |
|
||||
| 网络 | 100Mbps 以上 |
|
||||
|
||||
## 网络要求
|
||||
|
||||
以下域名需要可访问(用于 API 调用):
|
||||
|
||||
| 服务 | 域名 |
|
||||
|------|------|
|
||||
| OpenAI | api.openai.com |
|
||||
| DeepSeek | api.deepseek.com |
|
||||
| 阿里云 TTS | nls-gateway.cn-shanghai.aliyuncs.com |
|
||||
| 火山引擎 | openspeech.bytedance.com |
|
||||
Reference in New Issue
Block a user