docling icon indicating copy to clipboard operation
docling copied to clipboard

openwebui docling

Open Yuanyi1104 opened this issue 10 months ago • 1 comments

The content extraction engine I set in the documentation feature of OpenWebUI is docling. However, when handling files containing images, docling's powerful OCR recognition can indeed parse the images, but they are saved in base64 encoding. Moreover, this content is given to the large language model for processing with an "image" placeholder, which means that in reality, my model does not know what the images contain. What should I do? The OpenWebUI settings are as follows:

Image

The file with images is parsed as follows, and you can see that the image is an 'image'.

Image

Yuanyi1104 avatar Jan 16 '26 03:01 Yuanyi1104

By default, Docling outputs images as base64 or as placeholders like because most language models can't process raw image data—they only understand text. OCR extracts text from images, but if an image doesn't contain text (like a photo or diagram), you need image captioning to generate a description the LLM can use.

Docling supports automatic image captioning via the do_picture_description option, which uses a vision-language model to generate descriptions for images. This feature is off by default and must be enabled in the processing pipeline. You can use either a local model (picture_description_local) or an API-based model (picture_description_api, e.g., OpenAI's GPT-4 Vision). To ensure all images are processed, set picture_description_area_threshold to 0. The generated captions will appear as text in the Markdown output, allowing your LLM to "see" what the images contain instead of just placeholders. Details and example config

However, OpenWebUI currently does not expose these advanced Docling options in its UI. That means you can't enable image captioning or adjust thresholds from the OpenWebUI settings panel. To get image descriptions, you need to call Docling's API directly with the right options, or patch OpenWebUI to send them in its requests. See discussion

If you only see placeholders and not captions, it's likely that do_picture_description isn't enabled, or the vision-language model isn't configured or available. If you want to test this, try sending a request directly to Docling's /v1/convert/file or /v1/convert/source endpoint with do_picture_description=true and the appropriate model settings. The Markdown output in document.md_content should then include the generated descriptions. API usage example

If your LLM is multimodal and can process images directly, you could also export images in markdown and let the LLM interpret them, but for text-only models, enabling image captioning as described above is the best way to make image content accessible.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about docling Share Dosu with your team

dosubot[bot] avatar Jan 16 '26 03:01 dosubot[bot]