Replace the raw Ollama fetch-based OCR with the Vercel AI SDK, adding support for OpenAI, Google Gemini, Anthropic, and Ollama as selectable providers from the Settings page. Uses generateText with Output.object() and Zod schemas for type-safe structured data extraction. Made-with: Cursor
21 lines
620 B
Text
21 lines
620 B
Text
# Database (shared PostgreSQL on CT 102)
|
|
DATABASE_URL="postgresql://echos_ocr:YOUR_PASSWORD@192.168.68.102:5432/echos_ocr"
|
|
|
|
# AI Provider API Keys (set the ones you need)
|
|
OPENAI_API_KEY=""
|
|
GOOGLE_GENERATIVE_AI_API_KEY=""
|
|
ANTHROPIC_API_KEY=""
|
|
|
|
# Ollama (only needed if using Ollama as the AI provider)
|
|
OLLAMA_BASE_URL="http://192.168.68.108:11434"
|
|
OLLAMA_MODEL="llava:7b"
|
|
|
|
# MinIO S3 Storage (CT 105)
|
|
MINIO_ENDPOINT="192.168.68.105"
|
|
MINIO_PORT="9000"
|
|
MINIO_ACCESS_KEY="minioadmin"
|
|
MINIO_SECRET_KEY="YOUR_MINIO_SECRET"
|
|
MINIO_BUCKET="echos-ocr"
|
|
|
|
# Folder Watch (optional, mount a host path into the container)
|
|
WATCH_DIR=""
|