forked from YuanShiJiLoong/author
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
131 lines (105 loc) · 4.24 KB
/
Copy path.env.example
File metadata and controls
131 lines (105 loc) · 4.24 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# ============================================
# Author App — 环境变量配置
# ============================================
#
# 📖 使用教程:
#
# 1. 复制本文件并重命名:
# 将 .env.example 复制一份,命名为 .env.local
# (Windows: 复制粘贴后重命名; 命令行: copy .env.example .env.local)
#
# 2. 编辑 .env.local:
# 取消你需要的配置项的注释(删掉行首的 #),填入你自己的值
# 例如想用智谱AI,只需修改 API_KEY 那一行
#
# 3. 启动应用:
# 配置会自动生效,无需其他操作
#
# ⚠️ 注意事项:
# - 不要直接编辑 .env.example,它只是模板
# - .env.local 已被 .gitignore 忽略,不会泄露你的 Key
# - 如果同时在应用内 ⚙️ 设置了配置,应用内设置优先
# - 只需配置你使用的那一个供应商,不需要全部填写
#
# ============================================
# ==================== 服务端口 ====================
# 自定义服务端口(默认 3000,被占用时自动递增查找)
# PORT=3000
# ==================== OpenAI 兼容 API ====================
# 适用于: 智谱AI / DeepSeek / SiliconFlow / 火山引擎 / Moonshot 等
# 所有兼容 OpenAI /v1/chat/completions 格式的供应商均可使用
# API_KEY=
# API_BASE_URL=https://open.bigmodel.cn/api/paas/v4
# API_MODEL=glm-4-flash
# 各供应商 Base URL 参考:
# 智谱AI: https://open.bigmodel.cn/api/paas/v4
# DeepSeek: https://api.deepseek.com
# OpenAI: https://api.openai.com/v1
# SiliconFlow: https://api.siliconflow.cn/v1
# 火山引擎: https://ark.cn-beijing.volces.com/api/v3
# Moonshot: https://api.moonshot.cn/v1
# 各供应商推荐模型:
# 智谱AI: glm-4-flash (免费) / glm-4-plus / glm-4-long / glm-4
# DeepSeek: deepseek-v4-pro / deepseek-v4-flash
# SiliconFlow: deepseek-ai/DeepSeek-V3 / Qwen/Qwen2.5-72B-Instruct
# Moonshot: moonshot-v1-8k / moonshot-v1-32k / moonshot-v1-128k
# 兼容旧版变量名(优先使用 API_KEY)
# ZHIPU_API_KEY=
# ==================== Google Gemini ====================
# 官网: https://aistudio.google.com
# GEMINI_API_KEY=
# GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta
# GEMINI_MODEL=gemini-2.0-flash
# 可选模型: gemini-2.0-flash-lite / gemini-1.5-flash / gemini-1.5-pro
# OpenAI 兼容模式也可用,将 Base URL 改为:
# https://generativelanguage.googleapis.com/v1beta/openai
# 然后使用上方 API_KEY/API_BASE_URL/API_MODEL 配置即可
# ==================== Claude (Anthropic) ====================
# 官网: https://console.anthropic.com
# CLAUDE_API_KEY=
# CLAUDE_BASE_URL=https://api.anthropic.com
# CLAUDE_MODEL=claude-sonnet-4-20250514
# 可选模型: claude-3-7-sonnet-20250219 / claude-3-5-haiku-20241022
# ==================== OpenAI Responses API ====================
# 适用于 OpenAI /v1/responses 格式
# OPENAI_API_KEY=
# OPENAI_BASE_URL=https://api.openai.com/v1
# OPENAI_MODEL=gpt-4o-mini
# 可选模型: gpt-4o / gpt-4-turbo / gpt-3.5-turbo
# ==================== 快速配置示例 ====================
#
# 🔹 示例1: 用智谱AI免费模型(最简配置,只需一行)
# API_KEY=
# (把你的智谱 Key 填到等号后)
#
# 🔹 示例2: 用DeepSeek
# API_KEY=
# (把你的 DeepSeek Key 填到等号后)
# API_BASE_URL=https://api.deepseek.com
# API_MODEL=deepseek-v4-pro
#
# 🔹 示例3: 用Gemini
# GEMINI_API_KEY=
# (把你的 Gemini Key 填到等号后)
#
# 🔹 示例4: 用Claude
# CLAUDE_API_KEY=
# (把你的 Claude Key 填到等号后)
#
# 🔹 示例5: 自定义端口 + 智谱AI
# PORT=8080
# API_KEY=
# (把你的智谱 Key 填到等号后)
# ============================================
# Firebase 配置(云同步功能)
# ============================================
# 在 https://console.firebase.google.com/ 创建项目后,
# 进入项目设置 → 常规 → 你的应用 → Firebase SDK snippet → 配置
# 将以下值填入:
# NEXT_PUBLIC_FIREBASE_API_KEY=
# NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
# NEXT_PUBLIC_FIREBASE_PROJECT_ID=
# NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
# NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
# NEXT_PUBLIC_FIREBASE_APP_ID=
# NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=