-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathenv.example
More file actions
178 lines (156 loc) · 7.78 KB
/
env.example
File metadata and controls
178 lines (156 loc) · 7.78 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# StillMe - Learning AI system with RAG foundation Environment Configuration
# =============================================================================
# API Configuration
# =============================================================================
DEEPSEEK_API_KEY=sk-REPLACE_ME_WITH_YOUR_DEEPSEEK_KEY
OPENAI_API_KEY=sk-REPLACE_ME_WITH_YOUR_OPENAI_KEY
ANTHROPIC_API_KEY=sk-ant-REPLACE_ME_WITH_YOUR_ANTHROPIC_KEY
# External Data APIs (Phase 1 - Weather & News)
# GNews API key for news provider (free tier: 100 requests/day)
# Get your key at: https://gnews.io/api
GNEWS_API_KEY=REPLACE_ME_WITH_YOUR_GNEWS_KEY
# Claude model for evaluation (default: claude-3-haiku-20240307 for cost-effective evaluation)
# Options: claude-3-haiku-20240307, claude-3-sonnet-20240229, claude-3-opus-20240229
CLAUDE_MODEL=claude-3-haiku-20240307
# =============================================================================
# Database Configuration
# =============================================================================
DATABASE_URL=sqlite:///./data/stillme.db
# =============================================================================
# Server Configuration
# =============================================================================
# PORT is set by Railway automatically, but can be overridden for local development
PORT=8000
BACKEND_HOST=localhost
BACKEND_PORT=8000
FRONTEND_PORT=8501
# =============================================================================
# Learning Configuration
# =============================================================================
LEARNING_ENABLED=true
AUTO_APPROVAL_THRESHOLD=0.8
TRUST_SCORE_THRESHOLD=0.7
# =============================================================================
# Notification Configuration
# =============================================================================
EMAIL_SMTP_SERVER=smtp.gmail.com
EMAIL_SMTP_PORT=587
EMAIL_USERNAME=your_email@gmail.com
EMAIL_PASSWORD=REPLACE_ME_WITH_YOUR_APP_PASSWORD
TELEGRAM_BOT_TOKEN=REPLACE_ME_WITH_YOUR_BOT_TOKEN
TELEGRAM_CHAT_ID=REPLACE_ME_WITH_YOUR_CHAT_ID
# =============================================================================
# Notification Settings
# =============================================================================
NOTIFY_LEARNING_SESSIONS=true
NOTIFY_ERRORS=true
NOTIFY_SYSTEM_EVENTS=true
# =============================================================================
# Security Configuration
# =============================================================================
SECRET_KEY=REPLACE_ME_WITH_SECRET_KEY
ENCRYPTION_KEY=REPLACE_ME_WITH_ENCRYPTION_KEY
# API Authentication
# Set this to protect sensitive endpoints (database reset, scheduler control, etc.)
# If not set, authentication is disabled (development only - NOT for production!)
STILLME_API_KEY=REPLACE_ME_WITH_API_KEY
# API URL for testing (default: http://localhost:8000 for local, Railway URL for production)
# Set this to test against Railway backend: https://stillme-backend-production.up.railway.app
STILLME_API_URL=http://localhost:8000
# CORS Configuration
# Comma-separated list of allowed origins (e.g., "https://yourdomain.com,https://app.yourdomain.com")
# If not set, defaults to localhost only (development)
# Example: CORS_ALLOWED_ORIGINS=https://stillme.example.com,https://dashboard.stillme.example.com
CORS_ALLOWED_ORIGINS=
# =============================================================================
# Validator Chain Configuration (v0.6.4+)
# =============================================================================
# Enable validator chain to reduce hallucinations
ENABLE_VALIDATORS=false
ENABLE_TONE_ALIGN=true
# Evidence overlap threshold (lowered from 0.08 to 0.01 to prevent false positives
# when LLM translates/summarizes content, reducing vocabulary overlap)
VALIDATOR_EVIDENCE_THRESHOLD=0.01
VALIDATOR_CITATION_REQUIRED=true
STILLME_TONE_STYLE=neutral
# =============================================================================
# Self-Correction Configuration (Cost-Benefit Logic)
# =============================================================================
# Self-correction mode for RewriteLLM:
# - "off": No rewrites (disable self-correction)
# - "light": Conservative (max 1 rewrite for medium quality, max 2 for low quality)
# - "aggressive": More rewrites (max 2 for medium quality, max 2 for low quality)
# Default: "light" (balanced cost and quality)
SELF_CORRECTION_MODE=light
# =============================================================================
# Step-Level Validation & Consistency Checks (Phase 1 - SSR)
# =============================================================================
# Enable step-level validation for multi-step reasoning
# Default: true (enabled)
ENABLE_STEP_LEVEL_VALIDATION=true
# Enable self-consistency checks
# Default: true (enabled)
ENABLE_CONSISTENCY_CHECKS=true
# Minimum number of steps to trigger step-level validation
# Default: 2 (only validate if 2+ steps detected)
STEP_VALIDATION_MIN_STEPS=2
# Confidence threshold for flagging unreliable steps
# Steps with confidence below this will be flagged
# Default: 0.5
STEP_CONFIDENCE_THRESHOLD=0.5
# =============================================================================
# Persistent Cache Configuration (Railway/Production)
# =============================================================================
# Path to persistent volume for HuggingFace/SentenceTransformer model cache
# This prevents re-downloading models on every restart/redeploy
# On Railway: Set this to match railway.json volume mount path
# Example: PERSISTENT_CACHE_PATH=/app/hf_cache
# Alternative: Use HF_CACHE_PATH for custom HuggingFace cache location
PERSISTENT_CACHE_PATH=/app/hf_cache
HF_CACHE_PATH=
# Optional: HuggingFace auth token (private models / higher rate limits)
# Do NOT log this value in application logs
# HF_TOKEN=hf_XXXXXXXXXXXXXXXXXXXX
# =============================================================================
# Response Cache Configuration (v0.8+)
# =============================================================================
# Enable/disable caching for LLM responses, RAG retrievals, and HTTP responses
# Default: all enabled (true)
# Set to "false" to disable specific cache type
ENABLE_LLM_CACHE=true
ENABLE_RAG_CACHE=true
ENABLE_HTTP_CACHE=true
# Cache TTL (Time To Live) in seconds
# LLM Response Cache: 1 hour (3600s) - responses are cached for 1 hour
# RAG Retrieval Cache: 6 hours (21600s) - RAG results are cached for 6 hours
# HTTP Response Cache: 5 minutes (300s) - API responses are cached for 5 minutes
CACHE_TTL_LLM=3600
CACHE_TTL_RAG=21600
CACHE_TTL_HTTP=300
# Redis Configuration (Optional - for persistent cache)
# If Redis is available, cache will be persistent across restarts
# If not set, uses in-memory cache (lost on restart)
# REDIS_HOST=localhost
# REDIS_PORT=6379
# REDIS_PASSWORD=
# REDIS_URL=redis://localhost:6379
# =============================================================================
# ChromaDB Configuration
# =============================================================================
# ChromaDB database persistence path
# On Railway: Use /app/data/vector_db (default, uses persistent volume)
# Custom path: Set CHROMA_DB_PATH to override default
# Example: CHROMA_DB_PATH=/app/chroma_data
# CRITICAL: Use absolute path for Railway persistence (relative paths don't persist)
CHROMA_DB_PATH=
# Force reset ChromaDB database on startup (useful for fixing schema mismatch errors)
# Set to "true" to automatically delete and recreate vector_db directory on startup
# WARNING: This will delete all vector database data!
# Example: FORCE_DB_RESET_ON_STARTUP=true
FORCE_DB_RESET_ON_STARTUP=false
# =============================================================================
# Development Configuration
# =============================================================================
DEBUG=false
LOG_LEVEL=INFO
ENVIRONMENT=production