Class ContentEmbeddingStatistics
Statistics of the input text associated with the result of content embedding.
public record ContentEmbeddingStatistics : IEquatable<ContentEmbeddingStatistics>
- Inheritance
-
ContentEmbeddingStatistics
- Implements
- Inherited Members
Properties
TokenCount
Gemini Enterprise Agent Platform only. Number of tokens of the input text.
[JsonPropertyName("tokenCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? TokenCount { get; set; }
Property Value
Truncated
Gemini Enterprise Agent Platform only. If the input text was truncated due to having a length longer than the allowed maximum input.
[JsonPropertyName("truncated")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Truncated { get; set; }
Property Value
- bool?
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a ContentEmbeddingStatistics object.
public static ContentEmbeddingStatistics? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- ContentEmbeddingStatistics
The deserialized ContentEmbeddingStatistics object, or null if deserialization fails.