feat(documents): add docling (docling-serve) parsing backend#1
Closed
yuisheaven wants to merge 2 commits into
Closed
feat(documents): add docling (docling-serve) parsing backend#1yuisheaven wants to merge 2 commits into
yuisheaven wants to merge 2 commits into
Conversation
378ccf0 to
6e4dd00
Compare
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Add docling-serve as an OCR-strong document-parsing backend alongside unstructured, for photographed/scanned/handwritten text. - Images auto-route to a new images-only DoclingProcessor (priority 20). - Scanned/no-text-layer PDFs escalate to docling via DOCUMENT_OCR_PROVIDER=docling, reusing the classifier's text-layer detection so born-digital PDFs stay on the cheap local tiers. - nc_webdav_read_file gains a force_processor argument so the caller can re-parse a text-layer PDF (tables / partial text) with docling on demand. One shared docling-serve HTTP client (document_processors/docling_serve.py) backs both the DoclingProcessor and the OCR-tier _DoclingServeBackend. Config: ENABLE_DOCLING, DOCLING_API_URL, DOCLING_TIMEOUT, DOCLING_OCR_LANG, DOCLING_DO_OCR; docling added to the document_ocr_provider enum. New docling docker-compose profile. See docs/ADR-031. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- convert_file: raise ProcessorError (not JSONDecodeError/AttributeError) on a non-JSON or non-object docling-serve response, honoring the documented contract. - docling OCR backend always sends do_ocr=true (it IS the OCR tier); DOCLING_DO_OCR now tunes only the image processor, so it can't silently no-OCR scanned PDFs. Dropped docling_do_ocr from Settings/env-map (kept in _DEFAULTS for the image path). - Drop the misleading hardcoded docling_status metadata. - Docs: correct the docling image MIME list (add gif/webp) + clarify DOCLING_DO_OCR scope. - Tests: cover convert_file non-dict/non-JSON bodies and the progress-callback path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6e4dd00 to
e2ddfc7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add docling-serve as an OCR-strong document-parsing backend alongside
unstructured, for photographed/scanned/handwritten text.
DOCUMENT_OCR_PROVIDER=docling, reusing the classifier's text-layer
detection so born-digital PDFs stay on the cheap local tiers.
re-parse a text-layer PDF (tables / partial text) with docling on demand.
One shared docling-serve HTTP client (document_processors/docling_serve.py)
backs both the DoclingProcessor and the OCR-tier _DoclingServeBackend.
Config: ENABLE_DOCLING, DOCLING_API_URL, DOCLING_TIMEOUT, DOCLING_OCR_LANG,
DOCLING_DO_OCR; docling added to the document_ocr_provider enum. New docling
docker-compose profile. See docs/ADR-031.