-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
118 lines (91 loc) · 2.88 KB
/
Copy path.env.example
File metadata and controls
118 lines (91 loc) · 2.88 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
# Your Discord User ID (get from Discord Developer Mode)
# This is the ONLY user who can use the bot
ADMIN_DISCORD_ID=123456789012345678
# Discord Bot Token
DISCORD_BOT_TOKEN=your_discord_bot_token_here
# Discord Guild (Server) ID where bot is allowed (optional)
# Leave empty to allow DMs only, or set to restrict to specific server
ALLOWED_GUILD_ID=your_discord_server_id_here
# Channel Listening (Optional - if bot listens in a channel)
USE_CHANNEL=false
CHANNEL_ID=your_channel_id_here
# Environment: development or production
ENVIRONMENT=production
# API Base URL (where your FastAPI is running)
API_BASE_URL=http://127.0.0.1:8000
# Allowed host for TrustedHostMiddleware
ALLOWED_HOST=yourdomain.com
# Frontend URL (if you have a web dashboard)
FRONTEND_URL=https://yourdomain.com
# Allowed IPs (comma-separated, leave empty to disable)
ALLOWED_IPS=
# API Security
# openssl rand -hex 32
API_SECRET_KEY=dfdbe6a0a323ace34b8e108de876861046af6d2aa003b65f5df9f90b2398cee2
# PostgreSQL connection details
DB_HOST=localhost
DB_PORT=5432
DB_NAME=discord_rag
DB_USER=rag_user
DB_PASSWORD=your_secure_db_password_here
# VECTOR DATABASE (QDRANT)
QDRANT_URL=http://localhost:6333
QDRANT_API_KEY=your_qdrant_api_key_here
# CACHE (REDIS/VALKEY)
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=your_redis_password_here
# MESSAGE QUEUE (NATS)
NATS_URL=nats://localhost:4222
NATS_USER=rag_user
NATS_PASSWORD=your_nats_password_here
# OBJECT STORAGE (S3-COMPATIBLE)
AWS_ENDPOINT=https://your-s3-endpoint.com
AWS_ACCESS_KEY_ID=your_access_key_here
AWS_SECRET_ACCESS_KEY=your_secret_key_here
AWS_REGION=us-east-1
AWS_BUCKET=discord-rag-documents
AWS_URL=your_s3_url
AWS_USE_PATH_STYLE_ENDPOINT=true
# FILE UPLOAD SECURITY
MAX_FILE_SIZE=50000000
ALLOWED_MIME_TYPES=application/pdf,text/plain,text/markdown,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document
ALLOWED_FILE_EXTENSIONS=.pdf,.txt,.md,.doc,.docx
# LLM CONFIGURATION
USE_OPENAI=false
USE_GEMINI=false
USE_ANTHROPIC=false
OPENAI_API_KEY=your_openai_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
OPENAI_MODEL=gpt-3.5-turbo
ANTHROPIC_MODEL=claude-3-sonnet-20240229
DEFAULT_LLM_PROVIDER=openai
# DOCUMENT PROCESSING
EMBEDDING_MODEL=all-MiniLM-L6-v2
CHUNK_SIZE=1000
CHUNK_OVERLAP=200
MAX_CHUNKS_PER_DOC=100
RETRIEVAL_K=5
CACHE_TTL=3600
# PERFORMANCE TUNING
BATCH_SIZE=10
WORKER_TIMEOUT=300
# LOGGING AND MONITORING
LOG_LEVEL=INFO
ENABLE_AUDIT_LOG=true
# RATE LIMITING
RATE_LIMIT_UPLOAD_PER_MINUTE=5
RATE_LIMIT_SEARCH_PER_MINUTE=20
RATE_LIMIT_LIST_PER_MINUTE=10
# SSL/TLS CONFIGURATION (for production)
SSL_CERT_PATH=/path/to/cert.pem
SSL_KEY_PATH=/path/to/key.pem
# BACKUP CONFIGURATION
BACKUP_ENABLED=true
BACKUP_SCHEDULE=0 2 * * * # Daily at 2 AM
BACKUP_RETENTION_DAYS=30
BACKUP_S3_BUCKET=discord-rag-backups
# EXA AI CONFIGURATION
USE_EXA=false
EXA_API_KEY=your_exa_api_key_here