Spaces:
Sleeping
Sleeping
Commit History
-
rename package doc_agent -> docfield, distribution -> docfield-extract
The last identifier still carrying the old framing. The project is not an agent and the README says so; the import path said otherwise on every line of every module. Moved with git mv so history follows all 26 files, and kept as a package directory rather than flattened -- removing it would break the src layout the Space entry point depends on. pyproject needs [tool.uv.build-backend] module-name = "docfield". The uv build backend derives the module name from the project name, so a distribution called docfield-extract would otherwise look for src/docfield_extract/ and fail to find the package. Distribution name and import name differ on purpose: docfield-extract matches the repo, docfield is what you type. DB_PATH default moves from ./data/agent.db to ./data/docfield.db. This orphans any existing local database -- a watcher run against the new default starts an empty store and the old file is simply ignored, not migrated. There was no .db file in this working tree, so nothing was act…b6beb2d
-
feat(docling): Docling parser + native-PDF acquire path (T3)
docling_parser.py: DocumentConverter singleton with OCR disabled (native PDFs have embedded text; disabling OCR avoids the RapidOCR torch model that fails on Windows). core.py _make_acquire now handles native_pdf by calling parse_pdf and returning a text payload. Verified on a Foodpanda PDF receipt: 17 line items, vendor, date, currency all correct; H2/H3 hard failures correctly caught a total mismatch and routed to review.e2eec89
-
feat(gemini): Gemini backend + vision-direct image acquire (T2)
GeminiBackend: multimodal call, _ExtractionSchema with string dates for clean JSON schema, schema-constrained output via response_schema, 3-attempt exponential backoff. Factory registers the gemini builder. core.py replaces the placeholder _default_acquire with _make_acquire(settings), handling image+vision_direct by loading raw bytes; native_pdf/OCR still deferred. 11 mocked unit tests cover parsing, null fields, retry, backoff, exhaustion, and factory wiring. Verified on a real SGD receipt: vendor, date, line items, and subtotal correct; H2 correctly caught total!=subtotal+tax and routed to review. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7a6af4c