-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
85 lines (68 loc) · 2.07 KB
/
Copy path.env.example
File metadata and controls
85 lines (68 loc) · 2.07 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
# RAG System Environment Configuration
# Copy this file to .env and update with your values
# Application Settings
APP_NAME="RAG System"
DEBUG=false
LOG_LEVEL=INFO
# Database Configuration
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/ragdb
# For production, use a secure password:
# DATABASE_URL=postgresql://user:secure_password@host:5432/database_name
# Redis Configuration (optional, for caching)
REDIS_URL=redis://localhost:6379
CACHE_TTL=3600
# API Keys
OPENAI_API_KEY=your-openai-api-key-here
# Optional: Add other LLM provider keys
ANTHROPIC_API_KEY=your-anthropic-api-key-here
# Default Models
DEFAULT_EMBEDDING_MODEL=text-embedding-ada-002
DEFAULT_LLM_MODEL=gpt-4o-mini
# Embedding Model Options:
# - text-embedding-ada-002 (1536 dimensions)
# - text-embedding-3-small (1536 dimensions)
# - text-embedding-3-large (3072 dimensions)
# - all-MiniLM-L6-v2 (384 dimensions, local)
# - all-mpnet-base-v2 (768 dimensions, local)
# LLM Model Options:
# - gpt-4o-mini (fast, affordable)
# - gpt-4o (highest quality)
# - claude-3-haiku-20240307 (fast)
# - claude-3-sonnet-20240229 (balanced)
# Chunking Configuration
MAX_CHUNK_SIZE=500
CHUNK_OVERLAP=50
# Retrieval Configuration
RETRIEVAL_TOP_K=10
SIMILARITY_THRESHOLD=0.7
# Reranking Configuration
RERANKING_ENABLED=true
DEFAULT_RERANKING_MODEL=ms-marco-MiniLM-L-6-v2
RERANKING_BATCH_SIZE=32
# API Security (for production)
API_KEY_REQUIRED=false
# VALID_API_KEYS=key1,key2,key3
ALLOWED_HOSTS=*
CORS_ORIGINS=*
# Performance Settings
MAX_WORKERS=4
CONNECTION_POOL_SIZE=20
MAX_CONNECTIONS_PER_WORKER=10
# Circuit Breaker Settings
CIRCUIT_BREAKER_FAILURE_THRESHOLD=5
CIRCUIT_BREAKER_RECOVERY_TIMEOUT=30
CIRCUIT_BREAKER_TIMEOUT=10.0
# Monitoring
ENABLE_METRICS=true
METRICS_PORT=9090
# File Upload Limits
MAX_UPLOAD_SIZE=10485760 # 10MB in bytes
# PostgreSQL Optimization (optional)
# These can be set in postgresql.conf or as connection parameters
# POSTGRES_SHARED_BUFFERS=256MB
# POSTGRES_WORK_MEM=4MB
# POSTGRES_MAINTENANCE_WORK_MEM=64MB
# Development Settings
# RELOAD=true
# RELOAD_DIRS=src
# RELOAD_INCLUDES=*.py,*.yaml,*.yml,*.json