Class ContentEmbedding
The embedding generated from an input content.
public record ContentEmbedding : IEquatable<ContentEmbedding>
- Inheritance
-
ContentEmbedding
- Implements
- Inherited Members
Properties
Statistics
Gemini Enterprise Agent Platform only. Statistics of the input text associated with this embedding.
[JsonPropertyName("statistics")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ContentEmbeddingStatistics? Statistics { get; set; }
Property Value
Values
A list of floats representing an embedding.
[JsonPropertyName("values")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<double>? Values { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a ContentEmbedding object.
public static ContentEmbedding? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- ContentEmbedding
The deserialized ContentEmbedding object, or null if deserialization fails.