Browse Source

feat(loader): add picture description configuration for DoclingLoader

Vaclav Cerny 4 months ago
parent
commit
8644e81a1c
1 changed files with 6 additions and 0 deletions
  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 (