mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
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:
commit
f50755ccd9
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user