java.lang.Object
ai.docling.serve.client.operations.TaskOperations
- All Implemented Interfaces:
ai.docling.serve.api.DoclingServeTaskApi
public final class TaskOperations
extends Object
implements ai.docling.serve.api.DoclingServeTaskApi
Base class for task API operations. Provides operations for managing and querying
the status of asynchronous tasks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionai.docling.serve.api.chunk.response.ChunkDocumentResponsechunkTaskResult(ai.docling.serve.api.task.request.TaskResultRequest request) Retrieves the chunked result of a completed task identified by the specified task ID.ai.docling.serve.api.convert.response.ConvertDocumentResponseconvertTaskResult(ai.docling.serve.api.task.request.TaskResultRequest request) Retrieves the result of a completed task identified by the specified task ID.ai.docling.serve.api.task.response.TaskStatusPollResponsepollTaskStatus(ai.docling.serve.api.task.request.TaskStatusPollRequest request) Polls the current status of a specified task.
-
Constructor Details
-
TaskOperations
-
-
Method Details
-
pollTaskStatus
public ai.docling.serve.api.task.response.TaskStatusPollResponse pollTaskStatus(ai.docling.serve.api.task.request.TaskStatusPollRequest request) Polls the current status of a specified task. This method sends a GET request to the task status API endpoint to retrieve the current status of a task. The request includes the task ID and an optional wait time between polling attempts. The response contains details about the task's status, position in the queue, and any relevant metadata.- Specified by:
pollTaskStatusin interfaceai.docling.serve.api.DoclingServeTaskApi- Parameters:
request- an instance ofTaskStatusPollRequestcontaining the unique task identifier and optional wait time for polling. Must not be null.- Returns:
- a
TaskStatusPollResponsecontaining the current status of the task, its position in the queue, and any associated metadata. - Throws:
IllegalArgumentException- if therequestis null.
-
convertTaskResult
public ai.docling.serve.api.convert.response.ConvertDocumentResponse convertTaskResult(ai.docling.serve.api.task.request.TaskResultRequest request) Retrieves the result of a completed task identified by the specified task ID. This method sends a GET request to fetch the result of a task that has been processed. The response includes details about the converted document, processing time, status, and any potential errors or additional metadata related to the task.- Specified by:
convertTaskResultin interfaceai.docling.serve.api.DoclingServeTaskApi- Parameters:
request- an instance ofTaskResultRequestcontaining the unique task identifier. Must not be null.- Returns:
- a
ConvertDocumentResponsecontaining details about the converted document, processing time, status, and any associated errors or metadata. - Throws:
IllegalArgumentException- ifrequestis null.
-
chunkTaskResult
public ai.docling.serve.api.chunk.response.ChunkDocumentResponse chunkTaskResult(ai.docling.serve.api.task.request.TaskResultRequest request) Retrieves the chunked result of a completed task identified by the specified task ID. This method sends a GET request to fetch the chunked result of a task that has been processed. The response includes details about the chunks, associated documents, processing time, and any relevant metadata.- Specified by:
chunkTaskResultin interfaceai.docling.serve.api.DoclingServeTaskApi- Parameters:
request- an instance ofTaskResultRequestcontaining the unique task identifier. Must not be null.- Returns:
- a
ChunkDocumentResponsecontaining details about the chunks, documents, processing time, and any associated metadata. - Throws:
IllegalArgumentException- ifrequestis null.
-