-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
executable file
·80 lines (67 loc) · 2.78 KB
/
.env.example
File metadata and controls
executable file
·80 lines (67 loc) · 2.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
# === CRITICAL PRODUCTION VARIABLES ===
ENVIRONMENT=production
PYTHON_VERSION=3.11
# === RATE LIMITING & CACHING (REQUIRED) ===
# Upstash Redis REST credentials
# Get free: https://upstash.com
UPSTASH_REDIS_REST_URL=https://your-instance.upstash.io
UPSTASH_REDIS_REST_TOKEN=your_upstash_rest_token
MESSAGE_RATE_LIMIT_MAX=30
MESSAGE_RATE_LIMIT_WINDOW_SECONDS=60
MESSAGE_CACHE_TTL_SECONDS=3600
# === LITELLM (REQUIRED FOR INFERENCE) ===
# Base URL for the LiteLLM proxy (hosted or local)
LITELLM_BASE_URL=http://localhost:4000
# Use either the virtual key or the master key
LITELLM_VIRTUAL_KEY=sk-virtual-xxxxxxxxxxxxxxxx
# LITELLM_MASTER_KEY=sk-master-xxxxxxxxxxxxxxxx
LITELLM_TIMEOUT_SECONDS=60
# === STREAMING LIMITS ===
STREAM_MAX_SECONDS=25
STREAM_HEARTBEAT_SECONDS=2
STREAM_START_TIMEOUT_SECONDS=2
STREAM_IDEMPOTENCY_TTL_SECONDS=90
# === LITELLM PROXY PROVIDER KEYS (ONLY IF RUNNING THE PROXY LOCALLY) ===
# Groq API (free tier available)
# Get at: https://console.groq.com/keys
GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxx
# Google Gemini API (free tier available)
# Get at: https://ai.google.dev
GEMINI_API_KEY=AIzaSyxxxxxxxxxxxxxxxxxxxx
# OpenRouter API (optional for some models)
# Get at: https://openrouter.ai/keys
OPENROUTER_API_KEY=sk-or-xxxxxxxxxxxxxxxxxxxx
# === DATABASE (Supabase PostgreSQL) ===
# Get free tier at: https://supabase.com
SUPABASE_URL=https://projectid.supabase.co
SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
SUPABASE_DB_URL=postgresql://postgres:password@host.supabase.co:5432/postgres
# === PAYMENT PROCESSING (Dodo Payments) ===
# Get keys at: https://dodopayments.com/dashboard
DODO_API_KEY=your_dodo_api_key_here
DODO_WEBHOOK_ENDPOINT=ep_your_webhook_endpoint_id
DODO_WEBHOOK_URL=https://yourdomain.com/webhooks/dodo
# === CORS SECURITY ===
# Restrict API access to your domain only
ALLOWED_ORIGINS=https://yourdomain.onrender.com,https://yourdomain.com
# === MONITORING (OPTIONAL, SAFE DEFAULTS) ===
# Leave DSN empty to disable Sentry. Set *_ENABLED=false to force-disable.
SENTRY_DSN=
SENTRY_ENABLED=true
SENTRY_TRACES_SAMPLE_RATE=0.1
SENTRY_PROFILES_SAMPLE_RATE=0.0
SENTRY_RELEASE=
# === LOGGING (REQUIRED FOR PROD) ===
# Salt used to anonymize user IDs in logs. Use a strong random string in production.
LOG_USER_HASH_SALT=change-me-to-a-long-random-string
# === FRONTEND CONFIGURATION (PUBLIC - SAFE TO EXPOSE) ===
VITE_API_URL=https://knowbear-api.onrender.com
VITE_SUPABASE_URL=https://projectid.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
VITE_SENTRY_DSN=
VITE_SENTRY_ENABLED=true
VITE_SENTRY_TRACES_SAMPLE_RATE=0.1
VITE_SENTRY_RELEASE=
# If you include query parameters, wrap the URL in quotes to avoid shell parsing issues.
# Example:
# DODO_PAYMENT_LINK_ID="https://checkout.dodopayments.com/buy/pdt_xxx?quantity=1&redirect_url=https://yourdomain.com"