Files
NexusAI/.env.example
ericwyuan eeccf36ab3 [任务5] 重构方案:用 OpenWebUI + LiteLLM 替换 One-API + MySQL
技术栈简化:
- 前端:One-API 网页管理 → OpenWebUI 极简界面(WEBUI_AUTH=False 无需登录,自动连接 LiteLLM)
- 网关:One-API(数据库驱动)→ LiteLLM(纯 YAML 配置驱动)
- 数据存储:MySQL(持久化) → LiteLLM 无状态(配置即代码)

配置简化:
- 不需要注册账号、不需要点网页添加渠道
- 所有 5 个渠道的定义、模型映射、优先级、Failover 规则写在 litellm-config.yaml
- API Key 填在 .env(占位符在 config.yaml 中引用)
- 用户体验:打开网页 → 输入问题 → 自动用最合适的模型回答

已部署到 NAS,openwebui 正在初始化数据库(首次启动需要 1-2 分钟)
2026-08-23 09:30:42 +08:00

21 lines
787 B
Plaintext
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.
# NexusAI 部署环境变量模板
# 复制为 .env 并填入真实值;.env 已加入 .gitignore切勿提交版本库。
# ---- LiteLLM 网关 ----
# LiteLLM 后台管理 Key可自定义用于后台 API 认证,前端无需输入)
LITELLM_MASTER_KEY=sk-change_me_strong_key
# ---- 各 AI 渠道 API Key ----
# 这些 Key 被 litellm-config.yaml 引用,容器启动时自动注入为环境变量
# 获取方式:
# GEMINI_API_KEY: https://aistudio.google.com/apikey
# NVIDIA_API_KEY: https://build.nvidia.com/discover/llama2-70b
# GROQ_API_KEY: https://console.groq.com
# OPENROUTER_API_KEY: https://openrouter.ai/keys
# MISTRAL_API_KEY: https://console.mistral.ai/api-tokens
GEMINI_API_KEY=
NVIDIA_API_KEY=
GROQ_API_KEY=
OPENROUTER_API_KEY=
MISTRAL_API_KEY=