use OcrAutoOptions for automatic OCR engine selection.

This commit is contained in:
Yiorgis Gozadinos 2025-11-27 15:23:17 +02:00
parent 51104ddb5a
commit b4602b0cab
No known key found for this signature in database
2 changed files with 10 additions and 2 deletions

View file

@ -1,6 +1,14 @@
# Changelog
## [Unreleased]
### Changed
- **Async Chunker**: `DoclingServeChunker` now uses `httpx.AsyncClient` instead of sync `requests`
### Fixed
- **OCR Options**: Fixed `DoclingLocalConverter` using base `OcrOptions` class which docling's OCR factory doesn't recognize. Now uses `OcrAutoOptions` for automatic OCR engine selection.
## [0.19.2] - 2025-11-27
### Changed

View file

@ -59,7 +59,7 @@ class DoclingLocalConverter(DocumentConverter):
from docling.backend.docling_parse_backend import DoclingParseDocumentBackend
from docling.datamodel.base_models import InputFormat
from docling.datamodel.pipeline_options import (
OcrOptions,
OcrAutoOptions,
PdfPipelineOptions,
TableFormerMode,
TableStructureOptions,
@ -86,7 +86,7 @@ class DoclingLocalConverter(DocumentConverter):
else TableFormerMode.ACCURATE
),
),
ocr_options=OcrOptions(
ocr_options=OcrAutoOptions(
force_full_page_ocr=opts.force_ocr,
lang=opts.ocr_lang if opts.ocr_lang else [],
),