-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
41 lines (32 loc) · 2.5 KB
/
Copy path.env.example
File metadata and controls
41 lines (32 loc) · 2.5 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
# ─── API Security ────────────────────────────────────────────────────────────
# Clé d'authentification requise pour toutes les routes FastAPI (header X-API-Key)
# Générer une valeur sécurisée : python -c "import secrets; print(secrets.token_hex(32))"
API_KEY=changeme-generate-a-strong-random-key
# ─── LLM (Answer Generation) ─────────────────────────────────────────────────
# "openai" → GPT-4o-mini via API (best quality, requires API key)
# "ollama" → Local model via Ollama (completely free, no API key needed)
LLM_TYPE=openai
# Required only when LLM_TYPE=openai (or EMBEDDER_TYPE=openai)
OPENAI_API_KEY=sk-...
# OpenAI model to use when LLM_TYPE=openai
OPENAI_CHAT_MODEL=gpt-4o-mini
# ─── Ollama (Local LLM) ───────────────────────────────────────────────────────
# Only used when LLM_TYPE=ollama
# Install Ollama: https://ollama.com → then run: ollama pull llama3.2
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama3.2
# ─── Embeddings ──────────────────────────────────────────────────────────────
# "local" → HuggingFace sentence-transformers (free, runs on CPU, no API key)
# "openai" → OpenAI text-embedding-3-small (better accuracy, ~$0.02 per 1M tokens)
EMBEDDER_TYPE=local
# HuggingFace model to use when EMBEDDER_TYPE=local
LOCAL_EMBED_MODEL=sentence-transformers/all-MiniLM-L6-v2
# ─── 100% Free / Local mode ──────────────────────────────────────────────────
# Set both to use Ollama — no OpenAI API key needed:
# LLM_TYPE=ollama
# EMBEDDER_TYPE=local
# ─── Retrieval ───────────────────────────────────────────────────────────────
RETRIEVAL_K=4
# ─── Chunking ────────────────────────────────────────────────────────────────
CHUNK_SIZE=1000
CHUNK_OVERLAP=200