- 新增跨平台配置模型和全局配置支持 - 优化 Discord 适配器的连接管理和错误处理 - 添加 watchdog 和 discord.py 依赖 - 创建 DeepSeek API 配置文档 - 移除重复的同步帮助图片代码 - 改进跨平台插件配置加载逻辑
33 lines
1.1 KiB
Markdown
33 lines
1.1 KiB
Markdown
# DeepSeek API 配置示例
|
|
|
|
将以下环境变量添加到你的系统环境变量或 .env 文件中:
|
|
|
|
```bash
|
|
# DeepSeek API Key (从 https://platform.deepseek.com 获取)
|
|
DEEPSEEK_API_KEY=sk-你的实际API密钥
|
|
|
|
# DeepSeek API URL (可选,默认为官方 API)
|
|
DEEPSEEK_API_URL=https://api.deepseek.com/v1/chat/completions
|
|
|
|
# DeepSeek 模型名称 (可选,默认为 deepseek-chat)
|
|
DEEPSEEK_MODEL=deepseek-chat
|
|
```
|
|
|
|
或者在 Windows 系统中,可以通过以下方式设置环境变量:
|
|
|
|
**临时设置(仅当前会话有效):**
|
|
```powershell
|
|
$env:DEEPSEEK_API_KEY="sk-你的实际API密钥"
|
|
$env:DEEPSEEK_API_URL="https://api.deepseek.com/v1/chat/completions"
|
|
$env:DEEPSEEK_MODEL="deepseek-chat"
|
|
```
|
|
|
|
**永久设置(需要管理员权限):**
|
|
```powershell
|
|
[Environment]::SetEnvironmentVariable("DEEPSEEK_API_KEY", "sk-你的实际API密钥", "User")
|
|
[Environment]::SetEnvironmentVariable("DEEPSEEK_API_URL", "https://api.deepseek.com/v1/chat/completions", "User")
|
|
[Environment]::SetEnvironmentVariable("DEEPSEEK_MODEL", "deepseek-chat", "User")
|
|
```
|
|
|
|
设置完成后,重启终端或 IDE 使环境变量生效。
|