mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-29 06:32:52 +00:00
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.
|
||
|---|---|---|
| .. | ||
| data | ||
| internal | ||
| migrations | ||
| models | ||
| retrieval | ||
| routers | ||
| socket | ||
| static | ||
| storage | ||
| tools | ||
| utils | ||
| __init__.py | ||
| alembic.ini | ||
| config.py | ||
| constants.py | ||
| env.py | ||
| events.py | ||
| functions.py | ||
| main.py | ||
| tasks.py | ||