-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
111 lines (93 loc) · 4.23 KB
/
Copy path.env.example
File metadata and controls
111 lines (93 loc) · 4.23 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
# ============================================
# raguide — 环境变量模板
# ============================================
# 复制此文件为 .env 并填入真实值
# .env 已被 .gitignore 屏蔽,不会进 git
# ============================================
# --- LLM Providers ---
# REQUIRED. Get one of:
# - Real Anthropic key from https://console.claude.com → API Keys → Create
# - Proxy key (e.g. newapi.elevatesphere.com) for cost-effective routing
# Both work via the same SDK; only difference is which URL it points to (see below).
ANTHROPIC_API_KEY=sk-ant-...
# Optional. Custom base URL for proxy services (newapi, oneapi, etc.).
# IMPORTANT: do NOT include /v1 — Anthropic SDK appends /v1/messages itself.
# Example proxies:
# https://newapi.elevatesphere.com (correct)
# https://newapi.elevatesphere.com/v1 (WRONG — will 404)
# Leave empty to use the official Anthropic endpoint (https://api.anthropic.com).
ANTHROPIC_BASE_URL=
# Optional: DeepSeek API. v1.1 起可经业主「模型设置」面板路由。手填也可。
# DEEPSEEK_API_KEY=
# v1.1 多 provider LLM 配置:业主在应用内「模型设置」面板新增端点(Claude/GPT/DeepSeek)
# 并填 API Key 时,后端会把密钥写成 LLM_KEY_<ID> 形式追加到本 .env(DB 只存变量名)。
# 这些 LLM_KEY_* 由面板自动管理,通常无需手填。
# 例: LLM_KEY_GPT_4O=sk-...
# --- Qdrant ---
QDRANT_HOST=localhost
QDRANT_PORT=6333
QDRANT_API_KEY=
# --- PostgreSQL (业务数据) ---
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=raguide
POSTGRES_USER=raguide
POSTGRES_PASSWORD=raguide_dev_password
DATABASE_URL=postgresql+asyncpg://raguide:raguide_dev_password@localhost:5432/raguide
# --- Redis ---
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_URL=redis://localhost:6379/0
# --- Langfuse (本地自托管, M2b-Obs) ---
# UI on :3001 (host port; container :3000) — must match infra/docker-compose.langfuse.yml
LANGFUSE_HOST=http://localhost:3001
LANGFUSE_PUBLIC_KEY=pk-lf-raguide-m2b-dev
LANGFUSE_SECRET_KEY=sk-lf-raguide-m2b-dev-secret-0000000000000000
# Langfuse internals (v3 self-host requirements; generate per official docs)
LANGFUSE_SALT=please-generate-a-random-salt
LANGFUSE_NEXTAUTH_SECRET=please-generate-a-random-secret
LANGFUSE_ENCRYPTION_KEY=please-generate-a-64-char-hex-key
LANGFUSE_S3_ACCESS_KEY=minioadmin
LANGFUSE_S3_SECRET_KEY=minioadmin
# --- Eval (M2b-Obs production async eval) ---
# When EVAL_ENABLED=true, FastAPI BackgroundTasks fires AgentEvaluator + Ragas
# after each SSE `done` event. Errors are swallowed-log (no 5xx impact).
EVAL_ENABLED=true
EVAL_SAMPLE_RATE=1.0 # 0.0..1.0 — production judge sample rate
# --- SearXNG ---
SEARXNG_URL=http://localhost:8080
SEARXNG_SECRET=please-generate-a-random-secret-32-chars
# --- 应用配置 ---
APP_ENV=development # development / production
APP_LOG_LEVEL=INFO
APP_PORT=8000
# --- M2c Modular RAG inner pipeline ---
# SEARXNG_URL already declared above under "--- SearXNG ---"; reuse that value.
TANTIVY_URL=http://localhost:7700
TEI_URL=http://localhost:7997
QDRANT_COLLECTION_IMAGE=products_image
JINACLIP_MODEL_NAME=jinaai/jina-clip-v2
SELF_EVAL_TOP_SCORE_THRESHOLD=0.7
SELF_EVAL_MIN_COUNT=3
SELF_EVAL_MAX_ITER=2
# --- M3 minio (object storage for user image uploads) ---
MINIO_ENDPOINT=http://localhost:9000
MINIO_ROOT_USER=raguide
MINIO_ROOT_PASSWORD=raguide-dev-secret-change-in-prod
MINIO_BUCKET=raguide-uploads
# --- M5 Web UI (CORS for the browser client) ---
# Comma-separated browser origins allowed to call the backend. Dev = Next.js on :3000.
CORS_ALLOW_ORIGINS=http://localhost:3000
# SEED_IMAGES_DIR defaults to <repo>/infra/seed_images; override only if relocated.
# (Frontend backend base URL is set in apps/web/.env.local — see apps/web/.env.local.example)
# --- KB Admin API (owner-gated, M6) ---
# Owner-managed KB admin API. Empty = feature disabled (routes return 503).
ADMIN_TOKEN=
# --- Auth (JWT user accounts + RBAC) ---
# HS256 signing secret for login JWTs. Empty = auth disabled (register/login → 503).
# Generate with: openssl rand -hex 32
JWT_SECRET=
# --- Ops: Alertmanager webhook (P4) ---
# Alertmanager → POST /v1/ops/alerts 共享密钥(infra/alertmanager/alertmanager.yml 同值)
# Empty = feature disabled (routes return 503).
RAGUIDE_ALERT_TOKEN=