-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
216 lines (179 loc) · 8.76 KB
/
.env.example
File metadata and controls
216 lines (179 loc) · 8.76 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# Deepr Configuration
# Copy this file to .env and add your API keys
#
# Quick Setup (choose one to start):
# 1. OpenAI (recommended) - Get key: https://platform.openai.com/api-keys
# 2. Google Gemini (cost-effective) - Get key: https://aistudio.google.com/app/apikey
# 3. xAI Grok (agentic search) - Get key: https://console.x.ai/
#
# Then set your budget:
# deepr budget set 50
# ==============================================================================
# PROVIDER API KEYS (choose at least one)
# ==============================================================================
# ------------------------------------------------------------------------------
# OpenAI - Deep Research & GPT models
# ------------------------------------------------------------------------------
# Get your key: https://platform.openai.com/api-keys
# Deep Research: o3-deep-research ($0.50/query), o4-mini-deep-research ($0.10/query)
# GPT models: gpt-5 ($0.15), gpt-5-mini ($0.03), gpt-4.1 ($0.04), gpt-4.1-mini ($0.01)
# Note: gpt-5.2 available but requires approval ($0.25/query)
OPENAI_API_KEY=
# Optional OpenAI settings:
# OPENAI_BASE_URL=https://api.openai.com/v1
# OPENAI_ORGANIZATION=org-your-org-id
# ------------------------------------------------------------------------------
# Google Gemini - Thinking Models (excellent quality, very affordable)
# ------------------------------------------------------------------------------
# Get your key: https://aistudio.google.com/app/apikey
# Models: gemini-2.5-flash ($0.02/query), gemini-2.5-pro ($0.15/query)
GEMINI_API_KEY=
# ------------------------------------------------------------------------------
# xAI Grok - Agentic Search (web + X search, real-time information)
# ------------------------------------------------------------------------------
# Get your key: https://console.x.ai/
# Models: grok-4-1-fast-non-reasoning ($0.01/query), grok-4.20-reasoning ($0.10/query)
XAI_API_KEY=
# ------------------------------------------------------------------------------
# Anthropic - Claude models (Extended Thinking + agentic research)
# ------------------------------------------------------------------------------
# Get your key: https://console.anthropic.com/settings/keys
# Models: claude-opus-4-6 ($0.80), claude-sonnet-4-5 ($0.48), claude-haiku-4-5 ($0.05)
# Note: Anthropic does not offer native deep research — uses agentic web search
ANTHROPIC_API_KEY=
# Web search backends for Anthropic tools (at least one required)
# BRAVE_API_KEY=your-brave-search-api-key-here # Recommended: https://brave.com/search/api/
# TAVILY_API_KEY=your-tavily-api-key-here # Alternative: https://tavily.com/
# Or: pip install duckduckgo-search (free, no API key)
# ------------------------------------------------------------------------------
# Azure OpenAI Configuration
# ------------------------------------------------------------------------------
# AZURE_OPENAI_KEY=your-azure-openai-key-here
# AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
# AZURE_API_VERSION=2024-10-01-preview
# AZURE_USE_MANAGED_IDENTITY=false
# Azure Deployment Names (model mappings)
# AZURE_DEPLOYMENT_O3=o3-deep-research
# AZURE_DEPLOYMENT_O4_MINI=o4-mini-deep-research
# ------------------------------------------------------------------------------
# Azure AI Foundry Configuration (Enterprise deep research with Bing grounding)
# ------------------------------------------------------------------------------
# Requires: pip install deepr-research[azure-foundry]
# Auth: DefaultAzureCredential (az login for local, Managed Identity for cloud)
# Deep Research (o3): West US, Norway East, South Central US only
# GPT models (gpt-5, gpt-4.1, etc.): 20+ regions via Global Standard
# AZURE_PROJECT_ENDPOINT=https://your-project.services.ai.azure.com/api/projects/your-project
# AZURE_DEEP_RESEARCH_DEPLOYMENT=o3-deep-research
# AZURE_GPT_DEPLOYMENT=gpt-4.1
# AZURE_BING_RESOURCE_NAME=your-bing-connection-name
# ==============================================================================
# STORAGE CONFIGURATION
# ==============================================================================
# Storage type: "local" or "blob"
DEEPR_STORAGE=local
# Local storage path (default: data/reports)
# DEEPR_REPORTS_PATH=data/reports
# ------------------------------------------------------------------------------
# Azure Blob Storage Configuration (if using DEEPR_STORAGE=blob)
# ------------------------------------------------------------------------------
# AZURE_STORAGE_CONNECTION_STRING=your-connection-string-here
# AZURE_STORAGE_ACCOUNT_URL=https://youraccountname.blob.core.windows.net/
# AZURE_STORAGE_CONTAINER=reports
# AZURE_STORAGE_USE_MANAGED_IDENTITY=false
# ==============================================================================
# DATABASE CONFIGURATION
# ==============================================================================
# Database type: "jsonl", "sqlite", or "cosmosdb"
DEEPR_DATABASE_TYPE=jsonl
# JSONL database path (default: data/logs/job_log.jsonl)
# DEEPR_JSONL_PATH=data/logs/job_log.jsonl
# SQLite database path (if using sqlite)
# DEEPR_SQLITE_PATH=data/logs/jobs.db
# ------------------------------------------------------------------------------
# Cosmos DB Configuration (if using DEEPR_DATABASE_TYPE=cosmosdb)
# ------------------------------------------------------------------------------
# COSMOSDB_ENDPOINT=https://your-account.documents.azure.com:443/
# COSMOSDB_KEY=your-cosmos-db-key-here
# COSMOSDB_DATABASE=deepr
# COSMOSDB_CONTAINER=jobs
# ==============================================================================
# COST MANAGEMENT
# ==============================================================================
# Cost limits (in USD)
DEEPR_MAX_COST_PER_JOB=10.00
DEEPR_MAX_COST_PER_DAY=10.00
DEEPR_MAX_COST_PER_MONTH=100.00
# ==============================================================================
# RESEARCH CONFIGURATION
# ==============================================================================
# Provider Configuration
# Deep Research uses OpenAI (only provider with async Deep Research API)
# All other operations use xAI (cost-effective alternative)
DEEPR_DEEP_RESEARCH_PROVIDER=openai
DEEPR_DEEP_RESEARCH_MODEL=o4-mini-deep-research
DEEPR_DEFAULT_PROVIDER=xai
DEEPR_DEFAULT_MODEL=grok-4-1-fast-non-reasoning
# Prompt refinement
DEEPR_AUTO_REFINE=false # Automatically refine all prompts with best practices
# Output options
DEEPR_GENERATE_PDF=false
DEEPR_APPEND_REFERENCES=false
DEEPR_STRIP_INLINE_CITATIONS=true
# Job management
DEEPR_MAX_WAIT_TIME=1800 # seconds (30 minutes)
DEEPR_POLL_INTERVAL=30 # seconds
DEEPR_RETRY_ATTEMPTS=5
DEEPR_RETRY_DELAY=30 # seconds
# Batch processing
DEEPR_BATCH_PAUSE_EVERY=5
DEEPR_BATCH_PAUSE_DURATION=180 # seconds (3 minutes)
# ==============================================================================
# WEB INTERFACE / API
# ==============================================================================
# Webhook server
DEEPR_WEBHOOK_ENABLED=true
DEEPR_WEBHOOK_PORT=5000
DEEPR_WEBHOOK_HOST=0.0.0.0
# Ngrok (for local development)
DEEPR_USE_NGROK=true
# DEEPR_NGROK_PATH=ngrok
# Public webhook URL (for cloud deployment)
# DEEPR_PUBLIC_WEBHOOK_URL=https://your-domain.com/webhook
# ==============================================================================
# APPLICATION SETTINGS
# ==============================================================================
# Environment: "local" or "cloud"
DEEPR_ENVIRONMENT=local
# Debug mode
DEEPR_DEBUG=false
# Demo mode — auto-load sample data on startup (for screenshots / UI exploration)
# DEEPR_DEMO=1
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
DEEPR_LOG_LEVEL=INFO
# ==============================================================================
# NOTES
# ==============================================================================
#
# Cost Warning: Deep Research API calls can be expensive ($0.10-50+ per query)
# - Set conservative limits above
# - Use cost estimation before submission
# - Start with o4-mini-deep-research or gemini-2.5-flash (cheaper)
# - Auto mode routes to cheapest model that fits the task
# - Monitor spending regularly
#
# Multi-Provider Support:
# - Set one or more API keys above — auto mode picks the best available
# - OpenAI: Deep research + GPT models (most comprehensive)
# - Gemini: Cost-effective research and thinking models
# - xAI Grok: Real-time web search, latest news
# - Anthropic: Extended Thinking for complex reasoning
# - Azure Foundry: Enterprise deep research with Bing grounding
# - Run: python scripts/discover_models.py --show-registry (see all models)
#
# Local-First Philosophy:
# - SQLite queue (no infrastructure required)
# - Filesystem storage (simple, reliable)
# - Runs on Linux/Mac/Windows workstations
#
# Documentation: See README.md and docs/ for detailed configuration
#