Package ai.docling.serve.api
Interface DoclingServeApi.DoclingApiBuilder<T extends DoclingServeApi,B extends DoclingServeApi.DoclingApiBuilder<T,B>>
- Type Parameters:
T- the type of theDoclingServeApiimplementation being built.B- the type of the concrete builder implementation.
- Enclosing interface:
- DoclingServeApi
public static interface DoclingServeApi.DoclingApiBuilder<T extends DoclingServeApi,B extends DoclingServeApi.DoclingApiBuilder<T,B>>
A builder interface for constructing implementations of
DoclingServeApi. This interface
supports a fluent API for setting configuration properties before building an instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns an instance of the specified type, representing the completed configuration of the builder.default BEnables logging of requests for the API client being built.logRequests(boolean logRequests) Configures whether logging of API requests is enabled or not.default BEnables logging of responses for the API client being built.logResponses(boolean logResponses) Configures whether logging of API responses is enabled or not.
-
Method Details
-
logRequests
Enables logging of requests for the API client being built. This can be useful for debugging or monitoring the behavior of requests made to the API.This method influences the logging behavior of requests initiated by the client without specifying further configuration details.
- Returns:
thisbuilder instance for fluent API usage.
-
logRequests
Configures whether logging of API requests is enabled or not. Logging can help monitor or debug request communications with the API.- Parameters:
logRequests-trueto enable request logging;falseto disable it.- Returns:
thisbuilder instance for fluent API usage.
-
logResponses
Enables logging of responses for the API client being built. This can assist in debugging or monitoring the behavior of responses received from the API.- Returns:
thisbuilder instance for fluent API usage.
-
logResponses
Configures whether logging of API responses is enabled or not. Logging can help monitor or debug the responses received from the API.- Parameters:
logResponses-trueto enable response logging;falseto disable it.- Returns:
thisbuilder instance for fluent API usage.
-
build
T build()Builds and returns an instance of the specified type, representing the completed configuration of the builder. The returned instance is typically an implementation of the Docling API.- Returns:
- an instance of type
Trepresenting a configured Docling API client.
-