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

    • httpOptions

      public abstract Optional<HttpOptions> httpOptions()
      Used to override HTTP request options.
    • 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()
      Vertex API only. The MIME type of the input.
    • autoTruncate

      public abstract Optional<Boolean> 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.
    • 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.