Initial scaffold: local invoice OCR pipeline with Ollama, classifier branches, structured extraction, review, and Odoo XML export

- Add AGENTS.md and project-specific Zed skills (odoo-ocr-pipeline, odoo-xml-import, local-vlm-client).
- Implement Pydantic schemas for documents, invoices, review results, and VLM responses.
- Add unified BaseVLMClient with Ollama implementation and llama.cpp stub.
- Build pipeline stages: loader, classifier, digital_pdf/scanned_print/handwritten/mixed_unknown branches, extractor, reviewer, xml_builder.
- Add CLI entry point  with sidecar JSON and confidence-gated XML output.
- Include prompts for classifier, OCR, extraction, and review models.
- Add tests with FakeVLMClient; pytest, ruff, and mypy all pass.
This commit is contained in:
2026-08-21 14:04:42 +02:00
commit 7e706793fa
49 changed files with 2512 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Convenience script to run the Ollama endpoint used by this project.
# Override OLLAMA_HOST with the remote server if needed.
export OLLAMA_HOST="${OLLAMA_HOST:-http://100.103.83.12:11435}"
echo "Pulling models from ${OLLAMA_HOST}..."
ollama pull glm-ocr
ollama pull qwen2.5-vl:7b
ollama pull qwen2.5-vl:3b
echo "Ollama is ready at ${OLLAMA_HOST}"