Browse Source

feat(loader): add picture description configuration for DoclingLoader

Vaclav Cerny 4 tháng trước cách đây
mục cha
commit
8644e81a1c
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      backend/open_webui/retrieval/loaders/main.py

+ 6 - 0
backend/open_webui/retrieval/loaders/main.py

@@ -294,6 +294,12 @@ class Loader:
                         "do_picture_classification": self.kwargs.get(
                             "DOCLING_DO_PICTURE_DESCRIPTION"
                         ),
+                        "picture_description_local": (
+                            '{\n'
+                            '    "repo_id": "HuggingFaceTB/SmolVLM-256M-Instruct",\n'
+                            '    "prompt": "Describe the image in detail, including objects, actions, and connections. Use a descriptive and informative style."\n'
+                            '}'
+                        )
                     },
                 )
         elif (