-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
138 lines (110 loc) · 5.82 KB
/
.env.example
File metadata and controls
138 lines (110 loc) · 5.82 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
# Flask Configuration
# Secret key for session management and security
# IMPORTANT: Generate a secure random key for production
FLASK_SECRET_KEY=dev-secret-key
# Flask Environment (development, production, testing)
FLASK_ENV=development
# Logging Configuration
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL (default: INFO)
LOG_LEVEL=INFO
# MongoDB Configuration
# MongoDB connection URI
MONGODB_URI=mongodb://localhost:27017/
# MongoDB database name
MONGODB_DATABASE=document_parsing
# AWS Configuration
# AWS Textract requires the following credentials and configuration:
# AWS Access Key ID (required for AWS API access)
AWS_ACCESS_KEY_ID=your_aws_access_key_id
# AWS Secret Access Key (required for AWS API access)
AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key
# AWS Session Token (optional, only needed for temporary credentials)
# AWS_SESSION_TOKEN=your_session_token
# AWS Region (optional, defaults to us-east-1 if not specified)
AWS_DEFAULT_REGION=us-east-1
# S3 Bucket for AWS Textract (required for async document processing)
# This bucket must exist and have proper permissions for Textract
AWS_TEXTRACT_BUCKET=your-textract-bucket-name
# OpenAI Configuration
# OpenAI API Key (required for OpenAI Vision API provider)
# Get your API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=your_openai_api_key_here
# OpenAI Model (optional, defaults to gpt-4o-mini)
# Options: gpt-4o-mini, gpt-4o, gpt-4-vision-preview
OPENAI_MODEL=gpt-4o-mini
# OpenAI Max Tokens (optional, defaults to 1500)
# Maximum tokens for API response
OPENAI_MAX_TOKENS=1500
# OpenAI GPT-5 Configuration
# OpenAI GPT-5 API Key (optional, defaults to OPENAI_API_KEY if not set)
# Get your API key from: https://platform.openai.com/api-keys
OPENAI_GPT5_API_KEY=your_openai_api_key_here
# OpenAI GPT-5 Model (optional, defaults to gpt-5-2025-08-07)
# Options: gpt-5-2025-08-07 (recommended), gpt-5 (latest), gpt-5-chat-latest, gpt-5-mini-2025-08-07, gpt-5-nano-2025-08-07
# gpt-5-2025-08-07: Dated snapshot for reproducibility ($1.25/1M input, $10/1M output)
# gpt-5: Tracks latest snapshot ($1.25/1M input, $10/1M output)
# gpt-5-mini-2025-08-07: Balanced performance and cost ($0.25/1M input, $2/1M output)
# gpt-5-nano-2025-08-07: Most economical option ($0.05/1M input, $0.40/1M output)
OPENAI_GPT5_MODEL=gpt-5-2025-08-07
# OpenAI GPT-5 Max Tokens (optional, defaults to 8192)
# Maximum completion tokens for API response (GPT-5 supports up to 128K output tokens)
# Note: GPT-5 uses 'max_completion_tokens' instead of 'max_tokens'
# IMPORTANT: GPT-5 uses reasoning tokens internally, so set this higher (8192+ recommended)
OPENAI_GPT5_MAX_TOKENS=8192
# Anthropic Configuration
# Anthropic API Key (required for Anthropic Claude Vision API provider)
# Get your API key from: https://console.anthropic.com/
ANTHROPIC_API_KEY=your_anthropic_api_key_here
# Anthropic Model (optional, defaults to claude-3-5-sonnet-20240620)
# Options: claude-3-5-sonnet-20240620, claude-3-5-sonnet-20241022, claude-3-opus-20240229, claude-3-sonnet-20240229, claude-3-haiku-20240307
ANTHROPIC_MODEL=claude-3-5-sonnet-20240620
# Anthropic Max Tokens (optional, defaults to 2048)
# Maximum tokens for API response
ANTHROPIC_MAX_TOKENS=2048
# Anthropic fallback models (optional, comma-separated)
# Used when the preferred model is unavailable (e.g., account missing access)
ANTHROPIC_FALLBACK_MODELS=claude-3-sonnet-20240229,claude-3-haiku-20240307
# Anthropic Claude Sonnet 4.5 Configuration
# Anthropic Claude Sonnet 4.5 API Key (optional, defaults to ANTHROPIC_API_KEY if not set)
# Get your API key from: https://console.anthropic.com/
ANTHROPIC_SONNET45_API_KEY=your_anthropic_api_key_here
# Anthropic Claude Sonnet 4.5 Model (optional, defaults to claude-sonnet-4-5-20250929)
# Options: claude-sonnet-4-5-20250929 (recommended), claude-sonnet-4-5 (latest), claude-opus-4-1, claude-haiku-4-5
# claude-sonnet-4-5-20250929: Production snapshot with 1M context window ($3/1M input, $15/1M output)
# claude-opus-4-1: Highest quality for complex reasoning ($15/1M input, $75/1M output)
# claude-haiku-4-5: Fast and economical ($1/1M input, $5/1M output)
ANTHROPIC_SONNET45_MODEL=claude-sonnet-4-5-20250929
# Anthropic Claude Sonnet 4.5 Max Tokens (optional, defaults to 8192)
# Maximum tokens for API response (Claude Sonnet 4.5 supports up to 1M context)
# Higher limit recommended for extended analysis
ANTHROPIC_SONNET45_MAX_TOKENS=8192
# Google Document AI Configuration
# Required: GCP project and processor IDs for Document AI
GOOGLE_DOC_AI_PROJECT_ID=your_gcp_project_id
GOOGLE_DOC_AI_PROCESSOR_ID=your_processor_id
# Optional: processor location/region (default: us)
GOOGLE_DOC_AI_LOCATION=us
# Path to service account JSON with Document AI permissions
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account.json
# Azure AI Document Intelligence Configuration
# Required: Azure endpoint and API key for Document Intelligence
# Get your endpoint and key from Azure Portal: https://portal.azure.com/
AZURE_DOC_INTELLIGENCE_ENDPOINT=https://YOUR_RESOURCE.cognitiveservices.azure.com/
AZURE_DOC_INTELLIGENCE_KEY=your_azure_api_key_here
# Optional: Model ID to use (default: prebuilt-document)
# Options: prebuilt-document, prebuilt-layout, prebuilt-invoice, prebuilt-receipt, custom models
AZURE_DOC_INTELLIGENCE_MODEL=prebuilt-document
# Application Configuration
# Python path (useful for imports)
PYTHONPATH=/app
# Document Storage
# Local storage path for uploaded documents (optional, has default)
# DOCUMENT_STORAGE_ROOT=/path/to/storage
# PDF Conversion Configuration
# DPI for PDF to image conversion (default: 200)
# Higher DPI = better quality but slower conversion and larger file sizes
PDF_CONVERSION_DPI=200
# Maximum number of pages to convert from a single PDF (default: 4)
# Vision API providers (OpenAI, Anthropic) use only the first page
# Increase this for providers that support multi-page processing
PDF_CONVERSION_MAX_PAGES=4