浏览代码

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

**fix**: do_picture_description feature when using Docling as an external document parser
Tim Jaeryang Baek 4 月之前
父节点
当前提交
f50755ccd9
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      backend/open_webui/retrieval/loaders/main.py

+ 7 - 7
backend/open_webui/retrieval/loaders/main.py

@@ -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"):
-                    params["do_picture_classification"] = self.params.get(
-                        "do_picture_classification"
+                if self.params.get("do_picture_description"):
+                    params["do_picture_description"] = self.params.get(
+                        "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"