feat: use glm-ocr as default Ollama model (specialized OCR, not a general LLM)

- glm-ocr is a 1.1B parameter model built specifically for OCR
- No reasoning overhead, no thinking field issues
- Faster inference than qwen3.5 on CPU
- Removed old qwen3.5 models (2B + 0.8B) to free ~4GB disk
- Updated install.sh, ollama.go, .env.example defaults
This commit is contained in:
Claus Lohmar 2026-05-30 17:17:06 +00:00
parent 1eca4ae777
commit 3327fd4fac
3 changed files with 3 additions and 3 deletions

View file

@ -16,7 +16,7 @@ AI_PROVIDER=gemini
# For AI_PROVIDER=ollama:
# AI_BASE_URL=http://localhost:11434
# AI_MODEL=qwen3.5:2b
# AI_MODEL=glm-ocr
# --- SMTP (optional — needed for OTP emails and report delivery) ---
# SMTP_HOST=smtp.example.com

View file

@ -176,7 +176,7 @@ case "$AI_CHOICE" in
;;
3)
AI_PROVIDER="ollama"
AI_MODEL="qwen3.5:2b"
AI_MODEL="glm-ocr"
# Ollama's install script requires zstd
if ! command -v zstd &>/dev/null; then
info "Installing zstd (required by Ollama)..."

View file

@ -67,7 +67,7 @@ func (p *ollamaProvider) ExtractReceipt(imagePath string) (*ReceiptData, error)
model := os.Getenv("AI_MODEL")
if model == "" {
model = "qwen3.5:2b"
model = "glm-ocr"
}
b64Data := base64.StdEncoding.EncodeToString(imageData)