Merge pull request #14659 from vaclcer/vaclavs-picture-description

**fix**: do_picture_description feature when using Docling as an external document parser
This commit is contained in:
Tim Jaeryang Baek 2025-06-05 00:24:10 +04:00 committed by GitHub
commit f50755ccd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -148,13 +148,13 @@ class DoclingLoader:
params = { params = {
"image_export_mode": "placeholder", "image_export_mode": "placeholder",
"table_mode": "accurate", "table_mode": "accurate"
} }
if self.params: if self.params:
if self.params.get("do_picture_classification"): if self.params.get("do_picture_description"):
params["do_picture_classification"] = self.params.get( params["do_picture_description"] = self.params.get(
"do_picture_classification" "do_picture_description"
) )
if self.params.get("ocr_engine") and self.params.get("ocr_lang"): if self.params.get("ocr_engine") and self.params.get("ocr_lang"):
@ -291,10 +291,10 @@ class Loader:
params={ params={
"ocr_engine": self.kwargs.get("DOCLING_OCR_ENGINE"), "ocr_engine": self.kwargs.get("DOCLING_OCR_ENGINE"),
"ocr_lang": self.kwargs.get("DOCLING_OCR_LANG"), "ocr_lang": self.kwargs.get("DOCLING_OCR_LANG"),
"do_picture_classification": self.kwargs.get( "do_picture_description": self.kwargs.get(
"DOCLING_DO_PICTURE_DESCRIPTION" "DOCLING_DO_PICTURE_DESCRIPTION"
), )
}, }
) )
elif ( elif (
self.engine == "document_intelligence" self.engine == "document_intelligence"