[PR #11464] [MERGED] feat: Docling context extraction engine #45787

Closed
opened 2026-04-29 20:20:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/11464
Author: @FabioPolito24
Created: 3/9/2025
Status: ✅ Merged
Merged: 3/9/2025
Merged by: @tjbck

Base: dev ← Head: docling_context_extraction_engine


📝 Commits (10+)

  • 65443a3 feat: initial commit
  • e6715ce docs: fix readme
  • 22c100b feat: add contributing guide
  • 2419ef0 feat: docling support for document preprocessing
  • a44b35e fix: fix DoclingLoader input params
  • 9aa407d feat: merge with main
  • 0716f96 style: change style in DoclingLoader
  • 2982893 fix: format fixes
  • 9885718 Merge remote-tracking branch 'upstream/dev' into docling_context_extraction_engine
  • 17dbb3e fix: fix typo

📊 Changes

5 files changed (+86 additions, -0 deletions)

View changed files

📝 backend/open_webui/config.py (+6 -0)
📝 backend/open_webui/main.py (+2 -0)
📝 backend/open_webui/retrieval/loaders/main.py (+52 -0)
📝 backend/open_webui/routers/retrieval.py (+7 -0)
📝 src/lib/components/admin/Settings/Documents.svelte (+19 -0)

📄 Description

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for validating the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

Added

  • Implemented DoclingLoader to integrate Docling API for document parsing.

Changed

  • N/A

Deprecated

  • N/A

Removed

  • N/A

Fixed

  • N/A

Security

  • N/A

Breaking Changes

  • N/A

Additional Information

  • The parameters passed to the Docling API are currently hardcoded in the implementation.
  • It may be beneficial to allow configuring some of these parameters via environment variables or through the User Interface.
  • I am awaiting feedback on how best to proceed with this configuration and any additional improvements.

Configurable Parameters for Docling API

  • from_formats: (Optional) Input formats (e.g., "docx", "pdf"); defaults to all.
  • to_formats: (Optional) Output formats (e.g., "md", "json"); defaults to "md".
  • image_export_mode: (Optional) Image handling: "placeholder", "embedded", or "referenced"; defaults to "embedded".
  • do_ocr: Enable OCR (default: true).
  • force_ocr: Replace text with OCR (default: false).
  • ocr_engine: Engine choice (e.g., "easyocr"; default: "easyocr").
  • ocr_lang: Language(s) for OCR.
  • pdf_backend: PDF parser (default: "dlparse_v2").
  • table_mode: "fast" or "accurate" (default: "fast").
  • do_table_structure: Extract table structure (default: true)
  • include_images: Extract images from the document (default: true).
  • images_scale: image scale factor (default: 2).
  • abort_on_error: Stop on errors (default: false).
  • return_as_file: Always return a ZIP file (default: false).

Screenshots or Videos

  • N/A

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/11464 **Author:** [@FabioPolito24](https://github.com/FabioPolito24) **Created:** 3/9/2025 **Status:** ✅ Merged **Merged:** 3/9/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `docling_context_extraction_engine` --- ### 📝 Commits (10+) - [`65443a3`](https://github.com/open-webui/open-webui/commit/65443a3a66e2150ef4937e802f22609a23684812) feat: initial commit - [`e6715ce`](https://github.com/open-webui/open-webui/commit/e6715ce8b835052d3e7868178d67e5b4da1bd5d9) docs: fix readme - [`22c100b`](https://github.com/open-webui/open-webui/commit/22c100bb6b99e11506b1a0bf8bcbd4c1269e488a) feat: add contributing guide - [`2419ef0`](https://github.com/open-webui/open-webui/commit/2419ef06a0f58f543e3d3ab3d5700d8906c6979f) feat: docling support for document preprocessing - [`a44b35e`](https://github.com/open-webui/open-webui/commit/a44b35e99e560647da5952696f6aa3fb6e138ef6) fix: fix DoclingLoader input params - [`9aa407d`](https://github.com/open-webui/open-webui/commit/9aa407dbd2093cce6b25ec522cbed68e9304c1b1) feat: merge with main - [`0716f96`](https://github.com/open-webui/open-webui/commit/0716f96da8a11148736a9f784967cb3db8c3013c) style: change style in DoclingLoader - [`2982893`](https://github.com/open-webui/open-webui/commit/2982893d0d1a3428136294a89954cead7266bdba) fix: format fixes - [`9885718`](https://github.com/open-webui/open-webui/commit/98857184ff97e530f7b5b16b160e708a7edfe20a) Merge remote-tracking branch 'upstream/dev' into docling_context_extraction_engine - [`17dbb3e`](https://github.com/open-webui/open-webui/commit/17dbb3ec57e64b92c8c29b6cf196d349b868b20d) fix: fix typo ### 📊 Changes **5 files changed** (+86 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+6 -0) 📝 `backend/open_webui/main.py` (+2 -0) 📝 `backend/open_webui/retrieval/loaders/main.py` (+52 -0) 📝 `backend/open_webui/routers/retrieval.py` (+7 -0) 📝 `src/lib/components/admin/Settings/Documents.svelte` (+19 -0) </details> ### 📄 Description # Pull Request Checklist ### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request. **Before submitting, make sure you've checked the following:** - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [x] **Testing:** Have you written and run sufficient tests for validating the changes? - [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description - Added Docling as a content extraction engine to enhance document processing capabilities. - The Docling API server used is https://github.com/DS4SD/docling-serve ### Added - Implemented DoclingLoader to integrate Docling API for document parsing. ### Changed - N/A ### Deprecated - N/A ### Removed - N/A ### Fixed - N/A ### Security - N/A ### Breaking Changes - N/A --- ### Additional Information - The parameters passed to the Docling API are currently hardcoded in the implementation. - It may be beneficial to allow configuring some of these parameters via environment variables or through the User Interface. - I am awaiting feedback on how best to proceed with this configuration and any additional improvements. #### Configurable Parameters for Docling API - from_formats: (Optional) Input formats (e.g., "docx", "pdf"); defaults to all. - to_formats: (Optional) Output formats (e.g., "md", "json"); defaults to "md". - image_export_mode: (Optional) Image handling: "placeholder", "embedded", or "referenced"; defaults to "embedded". - do_ocr: Enable OCR (default: true). - force_ocr: Replace text with OCR (default: false). - ocr_engine: Engine choice (e.g., "easyocr"; default: "easyocr"). - ocr_lang: Language(s) for OCR. - pdf_backend: PDF parser (default: "dlparse_v2"). - table_mode: "fast" or "accurate" (default: "fast"). - do_table_structure: Extract table structure (default: true) - include_images: Extract images from the document (default: true). - images_scale: image scale factor (default: 2). - abort_on_error: Stop on errors (default: false). - return_as_file: Always return a ZIP file (default: false). ### Screenshots or Videos - N/A --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 20:20:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#45787