Interface DoclingRequestExecutor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy that decides how
DoclingDocumentParser invokes Docling to obtain a
ProcessedDocumentResponse for a prepared DocumentRequest (the document source has already been
injected into the request by the parser).
The default executor calls the
asynchronous convert/chunk endpoints matching the request type; those endpoints already submit a task, poll for
completion, and fetch the result on the Docling client's threads (with the reference client, set
asyncExecutor(...) on the DoclingServeApi builder to choose them). Supplying a custom executor lets
callers control exactly how Docling is called — for example to add retry or backoff, or for fully custom
orchestration. When a custom executor is supplied, the parser no longer restricts the request type or target, since
the executor owns those semantics.
-
Method Summary
Modifier and TypeMethodDescriptionCompletionStage<? extends ai.docling.serve.api.response.ProcessedDocumentResponse> execute(ai.docling.serve.api.DoclingServeApi client, ai.docling.serve.api.request.DocumentRequest request) Invokes Docling for the given request.
-
Method Details
-
execute
CompletionStage<? extends ai.docling.serve.api.response.ProcessedDocumentResponse> execute(ai.docling.serve.api.DoclingServeApi client, ai.docling.serve.api.request.DocumentRequest request) Invokes Docling for the given request.- Parameters:
client- the Docling client configured on the parserrequest- the request template with the document source already injected- Returns:
- a stage that completes with the Docling response
-