Class VlmModelLocal.Builder

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

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

Builder methods:

  • repoId(String) - Set the Hugging Face repository ID
  • prompt(String) - Set the prompt text
  • scale(Integer) - Set the image scale factor
  • responseFormat(ResponseFormat) - Set the response format
  • inferenceFramework(InferenceFramework) - Set the inference framework
  • transformersModelType(TransformersModelType) - Set the transformers model type
  • extraGenerationConfig(String, Object) - Add a single config entry (use with @Singular)
  • extraGenerationConfig(Map<String, Object>) - Set the generation configuration map
  • Method Details

    • repoId

      public @NonNull VlmModelLocal.Builder repoId(@Nullable String repoId)
      Repository id from the Hugging Face Hub.
      Parameters:
      repoId - the Hugging Face repository ID, or null if not specified
      Returns:
      this.
    • prompt

      public @NonNull VlmModelLocal.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 VlmModelLocal.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 VlmModelLocal.Builder responseFormat(@Nullable ResponseFormat responseFormat)
      Type of response generated by the model.
      Parameters:
      responseFormat - the response format, or null if not specified
      Returns:
      this.
    • inferenceFramework

      public @NonNull VlmModelLocal.Builder inferenceFramework(@Nullable VlmModelLocal.InferenceFramework inferenceFramework)
      Inference framework to use.
      Parameters:
      inferenceFramework - the inference framework, or null if not specified
      Returns:
      this.
    • transformersModelType

      public @NonNull VlmModelLocal.Builder transformersModelType(@Nullable VlmModelLocal.TransformersModelType transformersModelType)
      Type of transformers auto-model to use.
      Parameters:
      transformersModelType - the transformers model type, or null if not specified
      Returns:
      this.
    • extraGenerationConfig

      public @NonNull VlmModelLocal.Builder extraGenerationConfig(String extraGenerationConfigKey, Object extraGenerationConfigValue)
    • extraGenerationConfig

      public @NonNull VlmModelLocal.Builder extraGenerationConfig(@NonNull Map<? extends String,? extends Object> extraGenerationConfig)
    • clearExtraGenerationConfig

      public @NonNull VlmModelLocal.Builder clearExtraGenerationConfig()
    • build

      public @NonNull VlmModelLocal build()
    • toString

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