From 3327fd4face2059b543a5d727734d6a2b7883625 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Sat, 30 May 2026 17:17:06 +0000 Subject: [PATCH] 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 --- .env.example | 2 +- install.sh | 2 +- internal/ai/ollama.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 9f10a6f..eec0064 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/install.sh b/install.sh index 094e13d..45b68c1 100755 --- a/install.sh +++ b/install.sh @@ -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)..." diff --git a/internal/ai/ollama.go b/internal/ai/ollama.go index c4b28fa..df15151 100644 --- a/internal/ai/ollama.go +++ b/internal/ai/ollama.go @@ -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)