-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
107 lines (88 loc) · 3.85 KB
/
Copy path.env.example
File metadata and controls
107 lines (88 loc) · 3.85 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
# =============================================================================
# QueryWise — Environment Variables
# =============================================================================
# Copy this file to .env and fill in your values:
# cp .env.example .env
# =============================================================================
# -- Application --
ENVIRONMENT=development
DEBUG=false
# -- App Database (pgvector) --
# Stores metadata, glossary, embeddings, query history
DATABASE_URL=postgresql+asyncpg://querywise:querywise_dev@localhost:5432/querywise
# -- Security --
# Fernet encryption key for stored connection strings
# Generate with: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
ENCRYPTION_KEY=dev-encryption-key-change-in-production
# Secrets backend for encrypting connection strings at rest.
# env (default, Fernet) | aws | gcp | azure | vault (cloud backends are seams,
# register an implementation via app.core.secrets.register_secrets_backend)
SECRETS_BACKEND=env
# Allowed CORS origins (JSON list)
CORS_ORIGINS=["http://localhost:5173"]
# -- Observability --
LOG_LEVEL=INFO
# console (human-readable, default) | json (structured, for log aggregation)
LOG_FORMAT=console
# Expose Prometheus metrics at GET /metrics
ENABLE_METRICS=true
SERVICE_NAME=querywise-backend
# OpenTelemetry tracing (off by default). When enabled with no OTLP endpoint,
# spans print to stdout; set the endpoint to export to Jaeger/Tempo/Collector.
OTEL_ENABLED=false
# OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
# -- Background Jobs --
# inprocess (asyncio, default — single process) | arq (Redis-backed, multi-replica)
# For arq: install the extra (pip install -e ".[jobs]") and run a worker:
# JOB_BACKEND=arq arq app.jobs.worker.WorkerSettings
JOB_BACKEND=inprocess
REDIS_URL=redis://localhost:6379/0
# -- LLM Configuration --
# Uncomment ONE provider block below. Switching providers will clear and
# regenerate embeddings automatically (metadata is preserved).
# Vector dimension: 1536 for OpenAI/Anthropic, 768 for Ollama nomic-embed-text
EMBEDDING_DIMENSION=1536
# ---- Option 1: Anthropic ----
# DEFAULT_LLM_PROVIDER=anthropic
# DEFAULT_LLM_MODEL=claude-sonnet-4-5-20250929
# ANTHROPIC_API_KEY=
# OPENAI_API_KEY= # Required for embeddings (Anthropic has no embedding API)
# EMBEDDING_MODEL=text-embedding-3-small
# ---- Option 2: OpenAI ----
DEFAULT_LLM_PROVIDER=openai
DEFAULT_LLM_MODEL=gpt-5.2
OPENAI_API_KEY=
EMBEDDING_MODEL=text-embedding-3-small
# ---- Option 3: Ollama (fully local — no API keys needed) ----
# DEFAULT_LLM_PROVIDER=ollama
# OLLAMA_MODEL=llama3.1:8b
# OLLAMA_EMBEDDING_MODEL=nomic-embed-text
# EMBEDDING_DIMENSION=768
# Native Ollama on macOS (GPU-accelerated via Metal — recommended):
# OLLAMA_BASE_URL=http://host.docker.internal:11434
# Docker Ollama (CPU-only, start with: docker compose --profile ollama-docker up):
# OLLAMA_BASE_URL=http://ollama:11434
# ---- Option 4: Azure OpenAI (run the pipeline inside a customer VPC) ----
# DEFAULT_LLM_PROVIDER=azure_openai
# DEFAULT_LLM_MODEL=<your-chat-deployment-name>
# AZURE_OPENAI_ENDPOINT=https://<resource>.openai.azure.com
# AZURE_OPENAI_API_KEY=
# AZURE_OPENAI_API_VERSION=2024-10-21
# AZURE_OPENAI_DEPLOYMENT=<your-embedding-deployment-name>
# EMBEDDING_MODEL=<your-embedding-deployment-name>
# -- Query Defaults --
DEFAULT_QUERY_TIMEOUT_SECONDS=30
DEFAULT_MAX_ROWS=1000
MAX_RETRY_ATTEMPTS=3
# -- Rate Limiting --
MAX_QUERIES_PER_MINUTE=30
RATE_LIMIT_ENABLED=true
# -- Context Builder --
MAX_CONTEXT_TABLES=8
MAX_SAMPLE_QUERIES=3
# -- Sample Database Auto-Setup --
# Set to false to skip auto-creating the IFRS 9 sample connection on startup
AUTO_SETUP_SAMPLE_DB=true
# SAMPLE_DB_CONNECTION_STRING=postgresql://sample:sample_dev@sample-db:5432/sampledb
# -- Frontend (used in docker-compose) --
VITE_API_URL=http://localhost:8000