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:
parent
1eca4ae777
commit
3327fd4fac
3 changed files with 3 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ AI_PROVIDER=gemini
|
||||||
|
|
||||||
# For AI_PROVIDER=ollama:
|
# For AI_PROVIDER=ollama:
|
||||||
# AI_BASE_URL=http://localhost:11434
|
# 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 (optional — needed for OTP emails and report delivery) ---
|
||||||
# SMTP_HOST=smtp.example.com
|
# SMTP_HOST=smtp.example.com
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ case "$AI_CHOICE" in
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
AI_PROVIDER="ollama"
|
AI_PROVIDER="ollama"
|
||||||
AI_MODEL="qwen3.5:2b"
|
AI_MODEL="glm-ocr"
|
||||||
# Ollama's install script requires zstd
|
# Ollama's install script requires zstd
|
||||||
if ! command -v zstd &>/dev/null; then
|
if ! command -v zstd &>/dev/null; then
|
||||||
info "Installing zstd (required by Ollama)..."
|
info "Installing zstd (required by Ollama)..."
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ func (p *ollamaProvider) ExtractReceipt(imagePath string) (*ReceiptData, error)
|
||||||
|
|
||||||
model := os.Getenv("AI_MODEL")
|
model := os.Getenv("AI_MODEL")
|
||||||
if model == "" {
|
if model == "" {
|
||||||
model = "qwen3.5:2b"
|
model = "glm-ocr"
|
||||||
}
|
}
|
||||||
|
|
||||||
b64Data := base64.StdEncoding.EncodeToString(imageData)
|
b64Data := base64.StdEncoding.EncodeToString(imageData)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue