-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path.env.example
More file actions
43 lines (36 loc) · 1.48 KB
/
Copy path.env.example
File metadata and controls
43 lines (36 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# LLM 配置
# 提供商:openai、anthropic 或 aliyun
VITE_LLM_PROVIDER=aliyun
# API 基础 URL (可选,留空使用默认值)
# OpenAI 默认:https://api.openai.com/v1
# Anthropic 默认:https://api.anthropic.com/v1
# 阿里云百炼默认:https://dashscope.aliyuncs.com/compatible-mode/v1
VITE_LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
# API 密钥 (必填)
# 阿里云百炼请使用 DASHSCOPE_API_KEY
VITE_LLM_API_KEY=sk-xxx
# 模型 ID (可选,留空使用默认值)
# OpenAI 默认:gpt-4o-mini
# Anthropic 默认:claude-sonnet-4-20250514
# 阿里云百炼推荐:qwen-plus, qwen-max, qwen-turbo
VITE_LLM_MODEL=qwen-plus
# ==========================================
# 生产环境部署配置 (Cloudflare Workers/Pages)
# ==========================================
# 以下环境变量需要在 Cloudflare Dashboard 或使用 wrangler CLI 设置
# RSA 私钥 (用于解密用户上传的 API Key)
# 生成命令: openssl genrsa -out private.pem 2048
# 然后设置: wrangler secret put RSA_PRIVATE_KEY
# RSA_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----
# ...
# -----END PRIVATE KEY-----
# RSA 公钥 (用于前端加密 API Key)
# 生成命令: openssl rsa -in private.pem -pubout -out public.pem
# 然后设置: wrangler secret put RSA_PUBLIC_KEY
# RSA_PUBLIC_KEY=-----BEGIN PUBLIC KEY-----
# ...
# -----END PUBLIC KEY-----
# 可选:默认 LLM API 密钥 (当用户未配置时使用)
# OPENAI_API_KEY=sk-xxx
# ANTHROPIC_API_KEY=sk-ant-xxx
# DASHSCOPE_API_KEY=sk-xxx