Class EmbedContentConfig.Builder

java.lang.Object
com.google.genai.types.EmbedContentConfig.Builder
Enclosing class:
EmbedContentConfig

public abstract static class EmbedContentConfig.Builder extends Object
Builder for EmbedContentConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • httpOptions

      public abstract EmbedContentConfig.Builder httpOptions(HttpOptions httpOptions)
      Setter for httpOptions.

      httpOptions: Used to override HTTP request options.

    • httpOptions

      @CanIgnoreReturnValue public EmbedContentConfig.Builder httpOptions(HttpOptions.Builder httpOptionsBuilder)
      Setter for httpOptions builder.

      httpOptions: Used to override HTTP request options.

    • clearHttpOptions

      @CanIgnoreReturnValue public EmbedContentConfig.Builder clearHttpOptions()
      Clears the value of httpOptions field.
    • taskType

      public abstract EmbedContentConfig.Builder taskType(String taskType)
      Setter for taskType.

      taskType: Type of task for which the embedding will be used.

    • clearTaskType

      @CanIgnoreReturnValue public EmbedContentConfig.Builder clearTaskType()
      Clears the value of taskType field.
    • title

      public abstract EmbedContentConfig.Builder title(String title)
      Setter for title.

      title: Title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`.

    • clearTitle

      @CanIgnoreReturnValue public EmbedContentConfig.Builder clearTitle()
      Clears the value of title field.
    • outputDimensionality

      public abstract EmbedContentConfig.Builder outputDimensionality(Integer outputDimensionality)
      Setter for outputDimensionality.

      outputDimensionality: Reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024 only. You cannot set this value if using the earlier model (`models/embedding-001`).

    • clearOutputDimensionality

      @CanIgnoreReturnValue public EmbedContentConfig.Builder clearOutputDimensionality()
      Clears the value of outputDimensionality field.
    • mimeType

      public abstract EmbedContentConfig.Builder mimeType(String mimeType)
      Setter for mimeType.

      mimeType: Vertex API only. The MIME type of the input.

    • clearMimeType

      @CanIgnoreReturnValue public EmbedContentConfig.Builder clearMimeType()
      Clears the value of mimeType field.
    • autoTruncate

      public abstract EmbedContentConfig.Builder autoTruncate(boolean autoTruncate)
      Setter for autoTruncate.

      autoTruncate: Vertex API only. Whether to silently truncate inputs longer than the max sequence length. If this option is set to false, oversized inputs will lead to an INVALID_ARGUMENT error, similar to other text APIs.

    • clearAutoTruncate

      @CanIgnoreReturnValue public EmbedContentConfig.Builder clearAutoTruncate()
      Clears the value of autoTruncate field.
    • build

      public abstract EmbedContentConfig build()