Package com.google.genai.types
Class ModalityTokenCount
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ModalityTokenCount
Represents token counting info for a single modality.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for ModalityTokenCount. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ModalityTokenCount.Builder
builder()
Instantiates a builder for ModalityTokenCount.static ModalityTokenCount
Deserializes a JSON string to a ModalityTokenCount object.abstract Optional<MediaModality>
modality()
The modality associated with this token count.abstract ModalityTokenCount.Builder
Creates a builder with the same values as this instance.Number of tokens.Methods inherited from class com.google.genai.JsonSerializable
fromJsonString, toJson
-
Constructor Details
-
ModalityTokenCount
public ModalityTokenCount()
-
-
Method Details
-
modality
The modality associated with this token count. -
tokenCount
Number of tokens. -
builder
Instantiates a builder for ModalityTokenCount. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a ModalityTokenCount object.
-