Commit Graph

3 Commits

Author SHA1 Message Date
shawn ac7a8b1553 chore: add .gitignore (uploads, *.db, certs) 2026-05-25 20:14:53 -04:00
shawn f1707d9e6e chore: gitignore *.db and .env, remove tracked photos.db 2026-05-25 17:42:24 -04:00
shawn 3a67070063 Add LLM OCR engine via OpenCode Go + mimo-v2-omni
Adds optional LLM-based OCR as an alternative to Tesseract for reading
machine IDs from photos.

Backend (server.py):
- New run_ocr_llm() function calls OpenCode Go API (mimo-v2-omni model)
- Auto-falls back to Tesseract if API key missing or call fails
- Endpoints /api/analyze and /api/bulk-process accept ?ocr_engine=llm
  query param (default: tesseract) and ?ocr_model for model override
- Configurable via env vars: OPENCODE_GO_API_KEY, LLM_OCR_MODEL
- Requires User-Agent: Hermes-Agent/1.0 header for OpenCode Go API

Frontend (static/index.html):
- Toggle checkbox 'Use LLM OCR' in the UI
- OCR engine badge shown in results (llm vs tesseract + model name)
- getOcrParams() helper appends ?ocr_engine=llm to API calls

Infrastructure:
- .gitignore for uploads/ directory

Closes: #2
2026-05-25 17:12:37 -04:00