Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
77 lines (65 loc) · 2.38 KB
/
Copy path.env.example
File metadata and controls
77 lines (65 loc) · 2.38 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
# Mistral OCR API configuration
MISTRAL_API_KEY=
MISTRAL_BASE_URL=https://api.mistral.ai/v1
MISTRAL_UPLOAD_TIMEOUT_SECS=240
MISTRAL_OCR_TIMEOUT_SECS=300
MISTRAL_RETRY_ATTEMPTS=3
MISTRAL_RETRY_DELAY_MS=1000
# AI chat configuration
AI_PROVIDER=openai
AI_BASE_URL=https://api.openai.com/v1
AI_MODEL=gpt-4.1-mini
AI_API_KEY=
AI_TEMPERATURE=0.2
AI_RAG_TOP_K=5
AI_REQUEST_TIMEOUT_SECS=120
AI_RETRY_ATTEMPTS=3
AI_RETRY_DELAY_MS=1000
AI_SYSTEM_PROMPT=You are a grounded RAG assistant for the local document library. Answer clearly, stay close to the retrieved context, and say when the library does not contain enough evidence. When you rely on retrieved passages, cite them inline as [1], [2], and so on.
# Embedding model server configuration
EMBEDDING_SERVER_URL=http://localhost:11434/v1/embeddings
EMBEDDING_MODEL_NAME=jeffh/intfloat-multilingual-e5-large-instruct:q8_0
EMBEDDING_BATCH_SIZE=64
EMBEDDING_REQUEST_TIMEOUT_SECS=240
HTTP_CONNECT_TIMEOUT_SECS=15
# Ollama runtime tuning for keeping the embedding GPU worker saturated.
OLLAMA_NUM_PARALLEL=4
OLLAMA_MAX_LOADED_MODELS=1
OLLAMA_MAX_QUEUE=1024
OLLAMA_KEEP_ALIVE=24h
OLLAMA_FLASH_ATTENTION=1
# E5-instruct query template. Documents do not need an instruction prefix for this model.
EMBEDDING_QUERY_PREFIX="Instruct: Given a question about a local document library, retrieve passages that contain the answer, including paraphrases and nearby narrative context.\nQuery: {}"
EMBEDDING_PASSAGE_PREFIX=
# Vector search configuration
EMBEDDING_DIM=1024
QDRANT_COLLECTION=default
QDRANT_UPSERT_WAIT=false
EXACT_SEMANTIC_LAYOUT_LIMIT=2500
# Rate limiting
MCP_RATE_LIMIT=100
MCP_RATE_LIMIT_REFILL=100.0
# MCP search controls
MCP_SEARCH_DEFAULT_TOP_K=5
MCP_SEARCH_MAX_TOP_K=20
MCP_SEARCH_MAX_RESPONSE_TOKENS=5000
MCP_READ_DOCUMENT_MAX_TOKENS=10000
TOKENIZER_MODEL=o200k_harmony
# Optional lexical query expansion. Disabled by default.
# Modes: off, dictionary
QUERY_EXPANSION_MODE=off
QUERY_EXPANSION_DICTIONARY_PATHS=
QUERY_EXPANSION_MAX_TERMS=8
# Circuit Breakers
CB_FAILURE_THRESHOLD=5
CB_COOLDOWN_SECS=30
# VM Configuration
TENSOR_VM_BACKEND=simd
VM_MAX_INSTRUCTIONS=100000
TENSOR_VM_SOCKET_PATH=tensor_rag_vm.sock
# Core Database connection URLs
DATABASE_URL=postgres://postgres:postgres@localhost:5432/tensor_rag
QDRANT_URL=http://localhost:6334
# Startup retries for database services that are still becoming ready.
POSTGRES_INIT_RETRIES=10
POSTGRES_INIT_RETRY_DELAY_MS=1000