diff --git a/ai.go b/ai.go index f88f8ea..33ec85d 100644 --- a/ai.go +++ b/ai.go @@ -169,7 +169,7 @@ Respond in JSON ONLY: {"category": "...", "doc_type": "...", "date": "...", "vendor": "...", "amount": "...", "title": "...", "summary": "...", "full_text": "..."}` reqBody := map[string]interface{}{ - "model": "accounts/fireworks/models/kimi-k2p5", + "model": "accounts/fireworks/models/qwen3-vl-30b-a3b-instruct", "max_tokens": 4096, "messages": []map[string]interface{}{ {"role": "system", "content": "You are a document analysis API. Output ONLY raw JSON. No thinking, no commentary, no code fences. First character must be {, last character must be }."}, @@ -188,7 +188,7 @@ Respond in JSON ONLY: // Retry once with minimal prompt to avoid triggering extended reasoning log.Printf(" [AI] First attempt failed, retrying with simplified prompt...") retryBody := map[string]interface{}{ - "model": "accounts/fireworks/models/kimi-k2p5", + "model": "accounts/fireworks/models/qwen3-vl-30b-a3b-instruct", "max_tokens": 4096, "messages": []map[string]interface{}{ {"role": "system", "content": "Output valid JSON only. No other text."}, @@ -501,7 +501,7 @@ func AnalyzePageOnly(imageData []byte, pageNum int) (string, error) { FORMAT: Use ### for sections, **bold** for labels, markdown tables for tabular data, - bullets for lists. Preserve ALL numbers, dates, amounts, and values exactly as shown. If the document is in Russian, Dutch, German, French, or any other language — keep it in that language.` reqBody := map[string]interface{}{ - "model": "accounts/fireworks/models/kimi-k2p5", + "model": "accounts/fireworks/models/qwen3-vl-30b-a3b-instruct", "max_tokens": 4096, "messages": []map[string]interface{}{ {