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. 默认值
|
||||
Reference in New Issue
Block a user