Class ContentEmbeddingStatistics

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ContentEmbeddingStatistics

public abstract class ContentEmbeddingStatistics extends JsonSerializable
Statistics of the input text associated with the result of content embedding.
  • Constructor Details

    • ContentEmbeddingStatistics

      public ContentEmbeddingStatistics()
  • Method Details

    • truncated

      public abstract Optional<Boolean> truncated()
      Vertex API only. If the input text was truncated due to having a length longer than the allowed maximum input.
    • tokenCount

      public abstract Optional<Float> tokenCount()
      Vertex API only. Number of tokens of the input text.
    • builder

      public static ContentEmbeddingStatistics.Builder builder()
      Instantiates a builder for ContentEmbeddingStatistics.
    • toBuilder

      public abstract ContentEmbeddingStatistics.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static ContentEmbeddingStatistics fromJson(String jsonString)
      Deserializes a JSON string to a ContentEmbeddingStatistics object.