Class EmbedContentConfig

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.EmbedContentConfig

public abstract class EmbedContentConfig extends JsonSerializable
Optional parameters for the embed_content method.
  • Constructor Details

    • EmbedContentConfig

      public EmbedContentConfig()
  • Method Details

    • taskType

      public abstract Optional<String> taskType()
      Type of task for which the embedding will be used.
    • title

      public abstract Optional<String> title()
      Title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`.
    • outputDimensionality

      public abstract Optional<Integer> 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`).
    • mimeType

      public abstract Optional<String> mimeType()
      Gemini Enterprise Agent Platform only. The MIME type of the input.
    • autoTruncate

      public abstract Optional<Boolean> autoTruncate()
      Gemini Enterprise Agent Platform 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.
    • documentOcr

      public abstract Optional<Boolean> documentOcr()
      Gemini Enterprise Agent Platform only. Whether to enable OCR for document content. Only applicable to Gemini Embedding 2 models.
    • audioTrackExtraction

      public abstract Optional<Boolean> audioTrackExtraction()
      Gemini Enterprise Agent Platform only. Whether to extract audio from video content. Only applicable to Gemini Embedding 2 models.
    • httpOptions

      public abstract Optional<HttpOptions> httpOptions()
      Used to override HTTP request options.
    • builder

      public static EmbedContentConfig.Builder builder()
      Instantiates a builder for EmbedContentConfig.
    • toBuilder

      public abstract EmbedContentConfig.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static EmbedContentConfig fromJson(String jsonString)
      Deserializes a JSON string to a EmbedContentConfig object.