What's New in Docling Java#
Docling Java 0.5.0 includes important breaking changes, along with new features, enhancements, and bug fixes. This page includes the highlights of the release, but you can also check out the full release notes for more details about each change.
Docling Serve#
0.5.0#
Breaking Changes#
ConvertDocumentResponseis now an abstract class with three concrete implementations:InBodyConvertDocumentResponse- Response content embedded directly in the response bodyZipArchiveConvertDocumentResponse- Response content packaged and returned as a ZIP archivePreSignedUrlConvertDocumentResponse- Response content packaged as a ZIP archive and uploaded to an S3 bucket or a pre-signed URL and statistical data is returned.
- A discriminator method
getResponseType()is provided to determine the response type, returning one of:ResponseType.IN_BODYResponseType.ZIP_ARCHIVEResponseType.PRE_SIGNED_URL
- Response type determination logic:
InBodyConvertDocumentResponse(ResponseType.IN_BODY) - Returned when:- Target is
InBodyTarget(default) AND only a single source is provided
- Target is
ZipArchiveConvertDocumentResponse(ResponseType.ZIP_ARCHIVE) - Returned when:- Target is
ZipTargetOR - Multiple sources are provided with default or
InBodyTarget
- Target is
PreSignedUrlConvertDocumentResponse(ResponseType.PRE_SIGNED_URL) - Returned when:- Target is
S3TargetorPutTarget
- Target is
- Migration guide: Use
getResponseType()to determine the concrete type and cast accordingly, or use pattern matching (Java 16+) or instanceof checks to handle different response types.
0.4.8#
- Add S3-based source and target support with enhanced extensibility.
- Introduce API extension point and enhance builder usage.
0.4.1#
- Handle validation errors returned by Docling Serve (i.e.
422responses).
0.4.0#
- Implementation of the Docling Serve clear and task APIs in
docling-serve-apianddocling-serve-client. - Adding
pretty-printconfiguration option toDoclingServeClientto enable pretty printing of JSON requests and responses. - Adding the ability to specify an api key for the Docling Serve Testcontainer.
- Adding the ability to specify the api key for the Docling Serve requests.
- Adding async conversion support via
convertSourceAsync(ConvertDocumentRequest)which returns aCompletableFuture<ConvertDocumentResponse>. The method handles all polling internally and completes the future when the conversion is done. Configurable viaasyncPollInterval(Duration)andasyncTimeout(Duration)builder methods. - Adding async chunking support.
- Adding convenience methods for chunking/converting local files.
- Added Javadoc comments for classes in the
ai.docling.serve.apipackage.
0.3.0#
- The classes in the
docling-serve-apimodule have been moved from theai.docling.api.servepackage to theai.docling.serve.apipackage. - The classes in the
docling-serve-clientmodule have been moved from theai.docling.client.servepackage to theai.docling.serve.clientpackage. - The classes in the
docling-coremodule have been moved from theai.docling.api.corepackage to theai.docling.corepackage. - The
DoclingServeApiprovides two new methods:chunkSourceWithHierarchicalChunker()for chunking a source document with a hierarchical chunker andchunkSourceWithHybridChunker()for chunking a source document with a hybrid chunker. Read more about Docling chunkers in the Chunking section of the Docling documentation. - Module info files have been added to all of the modules