-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
36 lines (30 loc) · 1.55 KB
/
Copy path.env.example
File metadata and controls
36 lines (30 loc) · 1.55 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
# ============================================================
# RAG 学习教程 - 环境变量示例
# 复制本文件为 .env 并填入你自己的密钥;.env 已被 .gitignore 忽略。
# 所有提供方均通过 OpenAI 兼容接口接入,只需改 base_url / api_key / model。
# ============================================================
# ---------- LLM 提供方 ----------
# 可选:openai | ollama | zhipu | deepseek
LLM_PROVIDER=openai
LLM_MODEL=gpt-4o-mini
# base_url 留空则用各 SDK 默认地址
LLM_BASE_URL=
LLM_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx
# ---------- Embedding 提供方 ----------
# 可选:openai | ollama | zhipu
EMBED_PROVIDER=openai
EMBED_MODEL=text-embedding-3-small
EMBED_BASE_URL=
EMBED_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx
# ---------- 各提供方参考配置 ----------
# 1) OpenAI 官方
# LLM_PROVIDER=openai LLM_MODEL=gpt-4o-mini
# EMBED_PROVIDER=openai EMBED_MODEL=text-embedding-3-small
# 2) Ollama(本地,需先 ollama pull qwen2.5:7b 与 nomic-embed-text)
# LLM_PROVIDER=ollama LLM_MODEL=qwen2.5:7b LLM_BASE_URL=http://localhost:11434/v1 LLM_API_KEY=ollama
# EMBED_PROVIDER=ollama EMBED_MODEL=nomic-embed-text EMBED_BASE_URL=http://localhost:11434/v1 EMBED_API_KEY=ollama
# 3) 智谱 GLM(OpenAI 兼容)
# LLM_PROVIDER=zhipu LLM_MODEL=glm-4-flash LLM_BASE_URL=https://open.bigmodel.cn/api/paas/v4/
# EMBED_PROVIDER=zhipu EMBED_MODEL=embedding-3 EMBED_BASE_URL=https://open.bigmodel.cn/api/paas/v4/
# 4) DeepSeek
# LLM_PROVIDER=deepseek LLM_MODEL=deepseek-chat LLM_BASE_URL=https://api.deepseek.com