-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
87 lines (71 loc) · 3.25 KB
/
Copy path.env.example
File metadata and controls
87 lines (71 loc) · 3.25 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
# Copy to .env and edit. Every setting is optional — these are the defaults.
# cp .env.example .env
# --- Where things live -------------------------------------------------
APP_DOCS_ROOT=data/docs
APP_INDEX_PATH=data/index.db
# --- The model that writes answers -------------------------------------
# No GPU? llama3.2:3b (answers in ~10s)
# GPU 8GB+ llama3.1:8b (answers in ~5s) <- most vendors want this
# Pull it first: ollama pull llama3.2:3b
APP_LLM_BACKEND=ollama
APP_LLM_URL=http://localhost:11434
APP_LLM_MODEL=llama3.1:8b
# Low on purpose: the job is faithful reading, not creative writing.
APP_LLM_TEMPERATURE=0.1
APP_LLM_MAX_TOKENS=800
APP_LLM_TIMEOUT_S=120
# Used in the prompt: "You are the documentation assistant for {name}."
APP_PRODUCT_NAME=this product
# --- For vLLM / TGI / llama.cpp instead of Ollama ----------------------
# APP_LLM_BACKEND=openai-compatible
# APP_LLM_URL=http://localhost:8000
# APP_LLM_MODEL=meta-llama/Llama-3.1-8B-Instruct
# --- Embeddings (changing these requires a full reindex) ---------------
APP_EMBEDDING_BACKEND=fastembed
APP_EMBEDDING_MODEL=BAAI/bge-small-en-v1.5
APP_EMBEDDING_BATCH_SIZE=32
# --- How documents are split -------------------------------------------
APP_CHUNK_MAX_CHARS=1200
APP_CHUNK_OVERLAP_CHARS=150
# --- Retrieval ----------------------------------------------------------
APP_RETRIEVAL_TOP_K=5
# Below this score, answer "not in the documentation" without calling the model.
APP_RETRIEVAL_MIN_SCORE=0.35
# Ignore near-empty chunks ("Content coming soon!") that match on topic alone.
APP_RETRIEVAL_MIN_CHARS=40
# --- Typo handling ------------------------------------------------------
APP_SPELLCHECK_ENABLED=true
# Only retry a query with corrections when its best hit scored below this.
APP_SPELLCHECK_TRIGGER_SCORE=0.70
APP_SPELLCHECK_MIN_LENGTH=4
APP_SPELLCHECK_MIN_FREQ=2
# --- Crawler ------------------------------------------------------------
APP_CRAWL_MAX_PAGES=500
APP_CRAWL_TIMEOUT_S=20
# --- API server ---------------------------------------------------------
APP_API_HOST=0.0.0.0
APP_API_PORT=8000
# Origins your product is served from. REQUIRED for the widget to work in a
# browser. Never use "*" — that lets any site on the internet point a widget
# at your server.
APP_ALLOWED_ORIGINS=["https://app.yourproduct.com"]
# Optional. If you put your own middleware in front, have it sign each request
# body with this secret (HMAC-SHA256, hex, in the X-DCA-Signature header) and
# set APP_REQUIRE_SIGNATURE=true. Stateless — no per-install records anywhere.
APP_SHARED_SECRET=
APP_REQUIRE_SIGNATURE=false
# --- Abuse protection (on by default) -----------------------------------
# Set APP_RATE_LIMIT_ENABLED=false only when something in front of this server
# is already doing it.
APP_RATE_LIMIT_ENABLED=true
APP_RATE_LIMIT_PER_MINUTE=30
APP_RATE_LIMIT_PER_DAY=2000
# Protects the GPU. Rate limits bound requests over time; these bound how many
# answers generate at once, which is what actually saturates a card.
APP_MAX_CONCURRENT_GENERATIONS=4
APP_MAX_QUEUE_DEPTH=20
# --- Sessions (Redis required) ------------------------------------------
APP_REDIS_URL=redis://localhost:6379/0
# 24 hours, refreshed on each turn. Then the conversation is gone.
APP_SESSION_TTL_S=86400
APP_SESSION_MAX_TURNS=20