Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
81 lines (66 loc) · 2.73 KB
/
Copy path.env.example
File metadata and controls
81 lines (66 loc) · 2.73 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
# REQUIRED
# ------------------
# These environment variables are required for the app to work
# OpenAI API Key
OPENAI_API_KEY=
# Anthropic API Key
ANTHROPIC_API_KEY=
# Logfire Write Token
# Get yours at https://logfire.pydantic.dev → Settings → Write Tokens
LOGFIRE_TOKEN=
# Database URL
# For local development with Docker Compose:
DATABASE_URL=
# For production on Render, this will be auto-injected from the database service
# Render Workflows (the Q&A pipeline runs as a Workflows service)
# The gateway's POST /ask delegates to a Workflows service. Choose one setup:
#
# A) Fully local (no cloud, no API key) — run `render workflows dev` and set:
# RENDER_USE_LOCAL_DEV=true # SDK targets http://localhost:8120
# WORKFLOW_SLUG=local # any non-empty value (satisfies the gateway guard)
#
# B) Point local gateway at a deployed cloud workflow — set instead:
# RENDER_API_KEY=... # https://dashboard.render.com/settings#api-keys
# WORKFLOW_SLUG=... # slug of your deployed Workflows service
RENDER_USE_LOCAL_DEV=
RENDER_API_KEY=
WORKFLOW_SLUG=
# OPTIONAL
# ------------------
# These environment variables are not required for the app to work
# Logfire Read Token (optional - for fetching logs via API)
# Create a read-only token in your Logfire project → Settings → Read Tokens
LOGFIRE_READ_TOKEN=
# Pipeline Configuration
MAX_TOKENS=5000
# RAG Configuration
RAG_TOP_K=20 # Number of documents to retrieve (higher = more context, but slower)
SIMILARITY_THRESHOLD=0.3 # Cosine similarity threshold (0-1) for document retrieval (lower = more permissive)
VERIFICATION_THRESHOLD=0.30 # Similarity threshold (0-1) for claim verification (lower = more lenient)
EMBEDDING_MODEL=text-embedding-3-small
EMBEDDING_DIMENSIONS=1536
# Model Selection
ANSWER_MODEL=claude-sonnet-5-5
CLAIMS_MODEL=gpt-5.4-mini
ACCURACY_MODEL=claude-sonnet-5-5
EVAL_MODEL_OPENAI=gpt-5.4-mini
EVAL_MODEL_ANTHROPIC=claude-sonnet-5-5
QUERY_EXPANSION_MODEL=gpt-5.4-nano
# Performance
LOG_LEVEL=INFO
# Deployment environment tag for Logfire traces.
# Leave as production when deployed; set to development locally so dev traces
# aren't grouped with production in Logfire.
# ENVIRONMENT=development
# CORS
# Origins the browser may call the API from, as a comma-separated list.
# Defaults to http://localhost:3000. A bare host gets an https:// prefix.
# CORS_ORIGINS=http://localhost:3000
# Demo mode (see the README "Demo mode" section)
# DEMO=true (or 1, yes, y, t, on, in any letter case) turns on the public demo: usage
# limits, a lower answer token limit, and no server-side history. The limits apply only
# in demo mode. 0 turns a limit off.
DEMO=false
DEMO_RATE_LIMIT_PER_MINUTE=3
DEMO_MAX_QUESTIONS_PER_VISITOR=10
DEMO_DAILY_QUESTION_LIMIT=200