Package com.google.genai.types
Class ContentEmbedding
-
- All Implemented Interfaces:
public abstract class ContentEmbedding extends JsonSerializable
The embedding generated from an input content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classContentEmbedding.BuilderBuilder for ContentEmbedding.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description ContentEmbedding()
-
Method Summary
Modifier and Type Method Description abstract Optional<List<Float>>values()A list of floats representing an embedding. abstract Optional<ContentEmbeddingStatistics>statistics()Gemini Enterprise Agent Platform only. static ContentEmbedding.Builderbuilder()Instantiates a builder for ContentEmbedding. abstract ContentEmbedding.BuildertoBuilder()Creates a builder with the same values as this instance. static ContentEmbeddingfromJson(String jsonString)Deserializes a JSON string to a ContentEmbedding object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
statistics
abstract Optional<ContentEmbeddingStatistics> statistics()
Gemini Enterprise Agent Platform only. Statistics of the input text associated with this embedding.
-
builder
static ContentEmbedding.Builder builder()
Instantiates a builder for ContentEmbedding.
-
toBuilder
abstract ContentEmbedding.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static ContentEmbedding fromJson(String jsonString)
Deserializes a JSON string to a ContentEmbedding object.
-
-
-
-