-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
82 lines (71 loc) · 3.32 KB
/
Copy path.env.example
File metadata and controls
82 lines (71 loc) · 3.32 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
# ============================================
# DeepMemory environment variables
# Copy this file to .env and fill in real values (.env is gitignored).
# Precedence: env var > config.json > code default.
# ============================================
#
# Note: this build has removed payments (Stripe) and user registration (OAuth).
# All /v1/* endpoints are open access (no API key required).
# Multi-tenant isolation is driven by user_id in the request body
# (defaults to "default" when omitted).
# Secrets come from environment variables by default; config.json can stay
# empty (see config.json.example).
# --- LLM fact extraction (multi-provider, one required) ---
# LLM_PROVIDER: auto (default, detected by base_url) | openai | anthropic | openai_compatible
# - auto: if only ANTHROPIC_API_KEY is set, use native Anthropic; otherwise use LLM_* or DEEPSEEK_* (backward compatible)
# - openai / openai_compatible: OpenAI-compatible client (OpenAI / DeepSeek / vLLM / Ollama / Groq, etc.)
# - anthropic: native Anthropic SDK
# LLM_PROVIDER=auto
# Option A: DeepSeek (OpenAI-compatible, backward-compatible field)
DEEPSEEK_API_KEY=sk-your-deepseek-api-key
# DEEPSEEK_BASE_URL=https://api.deepseek.com
# DEEPSEEK_MODEL=deepseek-v4-flash
# Option B: generic OpenAI-compatible (OpenAI / vLLM / Ollama / LM Studio, etc.)
# LLM_API_KEY=sk-your-llm-key
# LLM_BASE_URL=https://api.openai.com/v1
# LLM_MODEL=gpt-4o
# Option C: native Anthropic
# ANTHROPIC_API_KEY=sk-ant-your-anthropic-key
# ANTHROPIC_MODEL=claude-3-5-sonnet-20241022
# --- Embedding model (required) ---
# EMBEDDING_PROVIDER: bge-m3 (local/HF remote, default) | google (Gemini) | openai (OpenAI-compatible endpoint)
EMBEDDING_PROVIDER=bge-m3
# BGE-M3: local directory path, or a HuggingFace model id (e.g. BAAI/bge-m3,
# auto-downloads on first use); leave unset to default to BAAI/bge-m3
BGE_M3_PATH=/opt/models/bge-m3
# BGE-M3 device: auto (default, uses CUDA when available) | cpu | cuda
# On small-VRAM GPUs (e.g. 8GB) running multiple processes/instances, prefer
# cpu to avoid VRAM contention stalls; CPU encodes ~0.3s per item, ~0.3s for a
# batch of 30 - plenty for low concurrency. Cold start is actually faster on
# CPU (no CUDA init).
# BGE_DEVICE=auto
# To use Google Gemini embeddings instead (requires Google API access):
# EMBEDDING_PROVIDER=google
# GOOGLE_API_KEY=your-google-api-key
# GOOGLE_EMBEDDING_MODEL=gemini-embedding-001
# To use an OpenAI-compatible embedding endpoint (OpenAI / vLLM / Ollama / LM Studio, etc.):
# EMBEDDING_PROVIDER=openai
# OPENAI_API_KEY=sk-...
# OPENAI_BASE_URL=https://api.openai.com/v1
# OPENAI_EMBEDDING_MODEL=text-embedding-3-small
# --- CORS (default *; in production set to specific origins, comma-separated) ---
# e.g. https://app.example.com,https://example.com
CORS_ORIGINS=*
# --- Rate limiting (per minute) ---
# Unset uses defaults; RATE_LIMIT_DISABLED=1 turns it off entirely
RATE_LIMIT_ADD=30/minute
RATE_LIMIT_SEARCH=60/minute
# RATE_LIMIT_DISABLED=1
# --- Qdrant (recommended for production) ---
# Leave empty to use local file storage ./data/qdrant (fine for dev)
QDRANT_URL=
# QDRANT_API_KEY=
# --- Service port ---
PORT=8000
# --- Debug ---
# DEEPMEMORY_DEBUG=1 # enables /v1/_debug/flush and allows CORS_ORIGINS=*
# --- Optional tuning ---
# CACHE_SIMILARITY_THRESHOLD=0.98
# CACHE_TTL_SECONDS=300
# BATCH_SILENCE_WINDOW_SECONDS=180
# BATCH_MAX_SIZE=50