Files
tsp-assistant/config/README.md
zhaojie a0de2a6c0e feat: 配置默认使用千问模型
- 修改默认LLM配置为千问模型(qwen-turbo)
- 创建LLM配置文件,支持千问、OpenAI、Anthropic等多种模型
- 添加千问模型的特殊支持和模拟响应
- 创建配置说明文档,指导用户如何配置千问API密钥
- 优化智能Agent的模拟响应,体现千问模型的特色
- 支持通过配置文件灵活切换不同的LLM提供商
2025-09-11 00:03:02 +08:00

54 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# LLM配置说明
## 千问模型配置
本项目默认使用阿里云千问模型。要使用千问模型,请按以下步骤配置:
### 1. 获取API密钥
1. 访问 [阿里云百炼平台](https://bailian.console.aliyun.com/)
2. 注册并登录账号
3. 创建应用并获取API密钥
### 2. 配置API密钥
编辑 `config/llm_config.py` 文件,将 `api_key` 替换为您的实际API密钥
```python
QWEN_CONFIG = LLMConfig(
provider="openai",
api_key="sk-your-actual-qwen-api-key", # 替换为您的实际密钥
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
model="qwen-turbo",
temperature=0.7,
max_tokens=2000
)
```
### 3. 可用的千问模型
- `qwen-turbo`: 快速响应,适合一般对话
- `qwen-plus`: 平衡性能和成本
- `qwen-max`: 最强性能,适合复杂任务
### 4. 环境变量配置(可选)
您也可以使用环境变量来配置:
```bash
export QWEN_API_KEY="sk-your-actual-qwen-api-key"
export QWEN_MODEL="qwen-turbo"
```
### 5. 其他模型支持
项目也支持其他LLM提供商
- **OpenAI**: GPT-3.5/GPT-4
- **Anthropic**: Claude系列
- **本地模型**: Ollama等
### 6. 配置验证
启动系统后可以在Agent管理页面查看LLM使用统计确认配置是否正确。