Package com.google.genai.types
Class EmbedContentConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.EmbedContentConfig
Optional parameters for the embed_content method.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for EmbedContentConfig. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGemini Enterprise Agent Platform only.Gemini Enterprise Agent Platform only.static EmbedContentConfig.Builderbuilder()Instantiates a builder for EmbedContentConfig.Gemini Enterprise Agent Platform only.static EmbedContentConfigDeserializes a JSON string to a EmbedContentConfig object.abstract Optional<HttpOptions>Used to override HTTP request options.mimeType()Gemini Enterprise Agent Platform only.Reduced dimension for the output embedding.taskType()Type of task for which the embedding will be used.title()Title for the text.abstract EmbedContentConfig.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
EmbedContentConfig
public EmbedContentConfig()
-
-
Method Details
-
taskType
Type of task for which the embedding will be used. -
title
Title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`. -
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
Gemini Enterprise Agent Platform only. The MIME type of the input. -
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
Gemini Enterprise Agent Platform only. Whether to enable OCR for document content. Only applicable to Gemini Embedding 2 models. -
audioTrackExtraction
Gemini Enterprise Agent Platform only. Whether to extract audio from video content. Only applicable to Gemini Embedding 2 models. -
httpOptions
Used to override HTTP request options. -
builder
Instantiates a builder for EmbedContentConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a EmbedContentConfig object.
-