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 class
Builder for EmbedContentConfig. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionVertex API only.static EmbedContentConfig.Builder
builder()
Instantiates a builder for EmbedContentConfig.static EmbedContentConfig
Deserializes a JSON string to a EmbedContentConfig object.abstract Optional<HttpOptions>
Used to override HTTP request options.mimeType()
Vertex API 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.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
EmbedContentConfig
public EmbedContentConfig()
-
-
Method Details
-
httpOptions
Used to override HTTP request options. -
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
Vertex API only. The MIME type of the input. -
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
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.
-