-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
122 lines (115 loc) · 5.77 KB
/
Copy path.env.example
File metadata and controls
122 lines (115 loc) · 5.77 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
112
113
114
115
116
117
118
119
120
121
122
# RECAP - Environment Variables
# Copy this file to .env and fill in your values
# =============================================================================
# LLM Provider (any OpenAI-compatible endpoint - at least one key required)
# =============================================================================
# Named providers: just supply the key (base URLs are built in).
GROQ_API_KEY=
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GOOGLE_API_KEY=
OPENROUTER_API_KEY=
# Custom / self-hosted OpenAI-compatible endpoint (Ollama, vLLM, LM Studio, ...).
# Select provider "custom" (or point any provider here). Leave the key blank for
# local servers that don't require one.
# In Docker, a host Ollama is at http://host.docker.internal:11434/v1 - NOT
# localhost (that's the container itself). Compose already maps that hostname.
LLM_BASE_URL=
LLM_API_KEY=
# Optional model override applied to whichever provider is selected.
LLM_MODEL=
# Preferred provider (groq/openai/anthropic/google/openrouter/ollama/custom).
# Leave blank to auto-pick the first provider that has a key.
DEFAULT_PROVIDER=
# =============================================================================
# Embedding Configuration
# =============================================================================
# Embeddings define the vector index (a STRUCTURAL, set-once choice - changing
# the model triggers an automatic re-index from stored text on next start).
# Provider: "local" (on-device, private default) or an OpenAI-compatible endpoint.
EMBEDDING_PROVIDER=local
EMBEDDING_MODEL=BAAI/bge-base-en-v1.5
# Curated on-device models (keep EMBEDDING_PROVIDER=local and pick one):
# BAAI/bge-base-en-v1.5 768-dim default; best size/quality balance
# BAAI/bge-large-en-v1.5 1024-dim higher quality, ~3x slower/larger
# sentence-transformers/all-MiniLM-L6-v2 384-dim fastest & smallest
# google/embeddinggemma-300m 768-dim Google's on-device model (2025)
# GATED: accept the license at huggingface.co/google/embeddinggemma-300m and run
# `huggingface-cli login` first; needs sentence-transformers>=5.1 (bump the pin).
#
# Easiest way to run EmbeddingGemma (ungated, no HF login, no pin bump) is via Ollama -
# `ollama pull embeddinggemma`, then point RECAP at Ollama's OpenAI-compatible endpoint:
# EMBEDDING_PROVIDER=ollama
# EMBEDDING_MODEL=embeddinggemma
# Or any other OpenAI-compatible endpoint (OpenAI, vLLM, LM Studio, ...):
# EMBEDDING_PROVIDER=custom
# EMBEDDING_BASE_URL=http://localhost:11434/v1
# EMBEDDING_API_KEY= # blank for local servers
# NOTE: a REMOTE embedding endpoint receives the text of every indexed page. A loopback
# address (127.0.0.1 / localhost) stays on your machine; anything else does not.
EMBEDDING_BASE_URL=
EMBEDDING_API_KEY=
# Dimension is derived from the model at load; this is only a fallback hint.
EMBEDDING_DIMENSION=768
# =============================================================================
# Server Configuration
# =============================================================================
# Bind to loopback only so no other device on the network can reach the backend
HOST=127.0.0.1
PORT=8000
LOG_LEVEL=info
# =============================================================================
# Storage Paths
# =============================================================================
# Base directory for all data (default: ./data)
DATA_DIR=./data
# SQLite database filename
DB_FILENAME=recap.db
# LanceDB directory name
VECTOR_STORE_DIR=vector_store
# Knowledge graph directory name
KG_DIR=knowledge_graph
# =============================================================================
# RAG Configuration
# =============================================================================
# Minimum content quality score (0.0-1.0) to index a page
MIN_CONTENT_QUALITY=0.3
# Maximum chunk size in tokens for semantic chunking
MAX_CHUNK_TOKENS=512
# Minimum chunk size in tokens
MIN_CHUNK_TOKENS=50
# Number of results to retrieve per search method
RETRIEVAL_TOP_K=10
# Per-day decay applied to fused scores so recently-visited pages rank higher
# (~35-day half-life). Set to 1.0 to disable recency weighting.
RECENCY_DECAY=0.98
# Final number of results after re-ranking
RERANK_TOP_K=5
# Cross-encoder model for re-ranking
RERANK_MODEL=cross-encoder/ms-marco-MiniLM-L-6-v2
# Minimum cosine similarity (0-1) between the current page and a candidate before
# the live Resurface card is shown. Precision-first: below the floor, no card.
# Raise toward 1.0 for fewer, more confident nudges; note the threshold is
# relative to the embedding model (0.75 is fairly permissive for BGE models).
RESURFACE_MIN_SIMILARITY=0.75
# =============================================================================
# Content Processing
# =============================================================================
# Minimum visit duration (seconds) before indexing a page
MIN_VISIT_DURATION=10
# Retention: delete pages not visited within this many days (0 = keep forever).
# Default 120 (~4 months) keeps the local index bounded instead of growing forever.
RETENTION_DAYS=120
# Knowledge graph master switch (entity extraction at ingestion + KG retrieval leg).
# Off by default - retrieval uses BM25 + dense vectors only. The extension Options
# page has a Knowledge Graph toggle that overrides this (persisted in DB meta).
# After enabling, backfill already-indexed pages with:
# curl -X POST http://127.0.0.1:8000/maintenance/rebuild_kg
ENABLE_KG=false
# SpaCy model for sentence tokenization
SPACY_MODEL=en_core_web_sm
# Embedding-prototype gate that skips login/account/checkout-like pages the URL
# rules miss (fails open if the embedder is unavailable).
SEMANTIC_GATE_ENABLED=true
# How decisively a page must match a sensitive prototype to be skipped (0.0-0.5)
SEMANTIC_GATE_MARGIN=0.02