-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
133 lines (98 loc) · 3.44 KB
/
Copy path.env.example
File metadata and controls
133 lines (98 loc) · 3.44 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
# Chart2CSV Environment Configuration
# Copy this file to .env and fill in your values
# Never commit .env files to version control!
# ============================================
# API Keys
# ============================================
# Mistral AI API Key (required for LLM extraction and Mistral OCR)
# Get your API key at: https://console.mistral.ai/
# Used for: LLM-based chart extraction (default mode)
MISTRAL_API_KEY=your_mistral_api_key_here
# ============================================
# CORS Configuration (Production)
# ============================================
# Comma-separated list of allowed origins for CORS
# Example: ALLOWED_ORIGINS=https://example.com,https://app.example.com
# Leave empty to use defaults:
# - https://kiku-jw.github.io
# - https://chart2csv.kikuai.dev
# - http://localhost:3000
ALLOWED_ORIGINS=
# ============================================
# Application Settings
# ============================================
# Environment: development | staging | production
# Affects logging level and error detail exposure
ENV=production
# API Host and Port (for local development)
# Production deployments typically use reverse proxy
API_HOST=0.0.0.0
API_PORT=8000
# Log Level: DEBUG | INFO | WARNING | ERROR | CRITICAL
LOG_LEVEL=INFO
# ============================================
# Rate Limiting
# ============================================
# Maximum requests per minute per IP
# Default: 20
RATE_LIMIT_PER_MINUTE=20
# ============================================
# File Upload Limits
# ============================================
# Maximum file size in MB
# Default: 10
MAX_FILE_SIZE_MB=10
# Maximum image dimensions (width or height in pixels)
# Default: 10000
MAX_IMAGE_DIMENSION=10000
# ============================================
# OCR Configuration
# ============================================
# OCR Backend: tesseract | mistral | auto
# - tesseract: Use Tesseract OCR (offline, faster)
# - mistral: Use Mistral Vision API (online, more accurate)
# - auto: Try Tesseract first, fallback to Mistral if available
# Default: auto
OCR_BACKEND=auto
# Tesseract executable path (optional, auto-detected if in PATH)
# TESSERACT_CMD=/usr/bin/tesseract
# ============================================
# Extraction Defaults
# ============================================
# Default extraction mode: llm | cv | auto
# - llm: Use LLM vision (Pixtral) - fastest, most accurate
# - cv: Use computer vision pipeline - works offline
# - auto: Try LLM first, fall back to CV
# Default: llm
DEFAULT_EXTRACTION_MODE=llm
# Enable overlay image generation
# Helps debug extraction quality
# Default: false (for performance)
GENERATE_OVERLAY=false
# ============================================
# Cache Configuration
# ============================================
# Enable OCR result caching
# Speeds up repeated extractions of same image
# Default: true
ENABLE_OCR_CACHE=true
# Cache directory
# Default: .cache/ocr
CACHE_DIR=.cache/ocr
# Cache TTL in days (0 = no expiration)
# Default: 7
CACHE_TTL_DAYS=7
# ============================================
# Development / Debugging
# ============================================
# Enable debug mode (verbose logging, detailed errors)
# WARNING: Do not enable in production!
# Default: false
DEBUG=false
# Preserve temporary files for debugging
# Temp images normally deleted after processing
# Default: false
KEEP_TEMP_FILES=false
# Enable FastAPI auto-reload (development only)
# Default: false
RELOAD=false