Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
67 lines (55 loc) · 2.08 KB
/
Copy path.env.example
File metadata and controls
67 lines (55 loc) · 2.08 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
# Database connection
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/ragdb
DATABASE_URL_SYNC=postgresql+psycopg2://postgres:postgres@localhost:5432/ragdb
# Storage directory for uploaded documents
STORAGE_DIR=./storage
# Maximum upload size in bytes (default: 100MB)
MAX_UPLOAD_SIZE=104857600
# Embedding model
# You can use either a Hugging Face model id OR a local folder path.
# If your server cannot access huggingface.co, download the model to ./models and set a local path, e.g.:
# EMBEDDING_MODEL=./models/bge-small-zh-v1.5
EMBEDDING_MODEL=BAAI/bge-small-zh-v1.5
# Vector store collection name
VECTOR_COLLECTION=rag_documents
# LangChain retrieval features
USE_SELF_QUERY=false
ENABLE_RERANKER=true
RERANKER_MODEL_PATH=./models/cross-encoder/ms-marco-MiniLM-L12-v2
# Hugging Face / Transformers networking (optional)
# Use a mirror endpoint if huggingface.co is unreachable from your server.
# HF_ENDPOINT=https://hf-mirror.com
# Cache locations (optional)
# HF_HOME=./.cache/huggingface
# TRANSFORMERS_CACHE=./.cache/huggingface
# SENTENCE_TRANSFORMERS_HOME=./.cache/sentence-transformers
# Offline mode (only after you've downloaded all needed models)
# HF_HUB_OFFLINE=1
# TRANSFORMERS_OFFLINE=1
# LLM model path (download the model and place it in this directory)
LLM_MODEL_PATH=./models/Qwen2.5-0.5B-Instruct/Qwen/Qwen2.5-0.5B-Instruct
# Processing concurrency
INDEXING_CONCURRENCY=1
GENERATION_CONCURRENCY=1
# Chunking parameters
CHUNK_SIZE=500
CHUNK_OVERLAP=50
# Retrieval parameters
DEFAULT_TOP_K=5
# LLM generation parameters
LLM_MAX_INPUT_LENGTH=2000
LLM_MAX_NEW_TOKENS=512
LLM_TEMPERATURE=0.7
LLM_TOP_P=0.9
# External OCR service URL (optional, leave empty if not used)
# Expected API contract:
# POST /ocr with multipart/form-data file upload
# Response: {"pages": [{"page": 1, "text": "..."}]}
#
# Quick start with the bundled OCR container:
# docker compose up -d ocr
# Then set:
# OCR_SERVICE_URL=http://127.0.0.1:9001/ocr
OCR_SERVICE_URL=http://127.0.0.1:9001/ocr
APT_MIRROR_URL=http://mirrors.aliyun.com/debian
APT_SECURITY_URL=http://mirrors.aliyun.com/debian-security