Class VlmModelApi.Builder

java.lang.Object
ai.docling.serve.api.convert.request.options.VlmModelApi.Builder
Enclosing class:
VlmModelApi

public static class VlmModelApi.Builder extends Object
Builder for creating VlmModelApi instances. Generated by Lombok's @Builder annotation.

Builder methods:

  • url(URI) - Set the API endpoint URL
  • header(String, Object) - Add a single HTTP header (use with @Singular)
  • headers(Map<String, Object>) - Set the map of HTTP headers
  • param(String, Object) - Add a single parameter (use with @Singular)
  • params(Map<String, Object>) - Set the map of model parameters
  • timeout(Duration) - Set the timeout duration
  • concurrency(Integer) - Set the maximum concurrency
  • prompt(String) - Set the prompt text
  • scale(Integer) - Set the image scale factor
  • responseFormat(ResponseFormat) - Set the response format
  • Method Details

    • url

      public @NonNull VlmModelApi.Builder url(@Nullable URI url)
      Endpoint which accepts openai-api compatible requests.
      Parameters:
      url - the API endpoint URL, or null if not specified
      Returns:
      this.
    • header

      public @NonNull VlmModelApi.Builder header(String headerKey, Object headerValue)
    • headers

      public @NonNull VlmModelApi.Builder headers(@NonNull Map<? extends String,? extends Object> headers)
    • clearHeaders

      public @NonNull VlmModelApi.Builder clearHeaders()
    • param

      public @NonNull VlmModelApi.Builder param(String paramKey, Object paramValue)
    • params

      public @NonNull VlmModelApi.Builder params(@NonNull Map<? extends String,? extends Object> params)
    • clearParams

      public @NonNull VlmModelApi.Builder clearParams()
    • timeout

      public @NonNull VlmModelApi.Builder timeout(@Nullable Duration timeout)
      Timeout for the API request.
      Parameters:
      timeout - the timeout duration, or null if not specified
      Returns:
      this.
    • concurrency

      public @NonNull VlmModelApi.Builder concurrency(@Nullable Integer concurrency)
      Maximum number of concurrent requests to the API.
      Parameters:
      concurrency - the maximum concurrency, or null if not specified
      Returns:
      this.
    • prompt

      public @NonNull VlmModelApi.Builder prompt(@Nullable String prompt)
      Prompt used when calling the vision-language model.
      Parameters:
      prompt - the prompt text, or null if not specified
      Returns:
      this.
    • scale

      public @NonNull VlmModelApi.Builder scale(@Nullable Integer scale)
      Scale factor of the images used.
      Parameters:
      scale - the image scale factor, or null if not specified
      Returns:
      this.
    • responseFormat

      public @NonNull VlmModelApi.Builder responseFormat(@Nullable ResponseFormat responseFormat)
      Type of response generated by the model.
      Parameters:
      responseFormat - the response format, or null if not specified
      Returns:
      this.
    • build

      public @NonNull VlmModelApi build()
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class Object