-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
45 lines (39 loc) · 2.34 KB
/
Copy path.env.example
File metadata and controls
45 lines (39 loc) · 2.34 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
# ── LLM Backend ──────────────────────────────────────────────────────────────
# Backend selection precedence:
# 1. LLM_BACKEND env var (if set) always takes effect.
# 2. If LLM_BACKEND is NOT set and llama-cpp-python is installed, llama_cpp
# is selected automatically.
# 3. If neither of the above applies, "ollama" is the default.
#
# "ollama" — fully local, free, no data leaves the network
# "llama_cpp" — in-process llama-cpp-python (auto-selected if installed)
# "anthropic" — Anthropic Claude API (requires ANTHROPIC_API_KEY below)
# "retrieval" — no LLM; returns raw matched chunks (offline / testing)
LLM_BACKEND=ollama
# ── llama-cpp-python settings (used when llama_cpp backend is active) ─────────
# Install: conda install -c conda-forge llama-cpp-python
# or: pip install "gsas-query[llama_cpp]"
# Download a GGUF model from Hugging Face, then set the path below.
# LLAMA_CPP_MODEL=/path/to/model.gguf
# LLAMA_CPP_N_CTX=4096 # context window size (tokens)
# LLAMA_CPP_MAX_TOKENS=1500 # maximum tokens to generate
# ── Ollama settings (used when LLM_BACKEND=ollama) ───────────────────────────
# Install Ollama: https://ollama.com
# Pull a model: ollama pull llama3
# Recommended models (balance of quality and speed):
# llama3 — 8B params, good quality, ~8 GB RAM
# llama3:70b — 70B params, excellent quality, ~48 GB RAM / GPU
# mistral — fast, ~5 GB RAM
# phi3 — lightweight, ~4 GB RAM
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=llama3
# ── Anthropic API (only needed if LLM_BACKEND=anthropic) ─────────────────────
# ANTHROPIC_API_KEY=sk-ant-...
# ANTHROPIC_MODEL=claude-sonnet-4-6
# ── Server settings ───────────────────────────────────────────────────────────
# Comma-separated origins allowed for CORS. Use "*" to allow all.
ALLOWED_ORIGINS=*
# Requests per minute per IP (0 to disable)
RATE_LIMIT_RPM=30
# Secret key required for POST /ingest (leave blank to disable auth on that route)
ADMIN_KEY=