open-webui/backend/open_webui
jannefleischer 2571fe1b11 feat: rework DoclingLoader as async submit/poll/retrieve with timeout
The existing docling extraction engine called Docling's synchronous
/v1/convert/file endpoint and blocked until conversion finished, with
no timeout and no visibility into queue position while waiting.

Rework DoclingLoader to use the async Docling API instead:
- _submit_file(): POST /v1/convert/file/async, returns a task_id
- _poll_task_until_done(): long-polls /v1/status/poll/{task_id} until
  success/failure, respecting an optional overall timeout
- _retrieve_result(): GET /v1/result/{task_id} once the task succeeds
- load_from_task_id(): resume polling+retrieval for an
  already-submitted task_id, e.g. after a server restart while
  docling-serve is still processing it
- optional status_callback(dict) hook, invoked with task_id and queue
  position as they become available, so a caller can persist/display
  progress (inert unless a caller supplies one)

New DOCLING_SERVE_TIMEOUT setting (env var + rag config API) controls
the overall wait; unset means wait indefinitely, matching the previous
behavior.

Deliberately excludes: the DoclingLoaderJson structured-JSON extraction
engine and its chunk-mode config, and the unrelated RAG pipeline
improvements (citation extraction, JSON context format, etc.) — those
remain on a separate branch to be split out on their own.
2026-07-09 16:13:08 +02:00
..
data
internal refac 2026-06-29 12:40:20 -05:00
migrations refac 2026-07-01 03:37:35 -05:00
models refac 2026-07-01 03:01:46 -05:00
retrieval feat: rework DoclingLoader as async submit/poll/retrieve with timeout 2026-07-09 16:13:08 +02:00
routers feat: rework DoclingLoader as async submit/poll/retrieve with timeout 2026-07-09 16:13:08 +02:00
socket refac 2026-06-29 03:58:00 -05:00
static chore: format 2026-06-01 14:10:40 -07:00
storage refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
tools refac 2026-07-01 03:35:46 -05:00
utils refac 2026-07-01 03:37:35 -05:00
__init__.py refac 2026-06-17 03:01:11 +02:00
alembic.ini
config.py feat: rework DoclingLoader as async submit/poll/retrieve with timeout 2026-07-09 16:13:08 +02:00
constants.py refac 2026-06-29 05:46:51 -05:00
env.py refac 2026-07-01 02:59:14 -05:00
events.py refac 2026-07-01 03:22:13 -05:00
functions.py fix: emit [DONE] for AsyncGenerator pipe returns (#24763) 2026-05-19 22:07:56 +04:00
main.py refac 2026-07-01 03:37:35 -05:00
tasks.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00