CountTokensResponse class final
A response from CountTokens.
It returns the model's token_count for the prompt.
- Inheritance
-
- Object
- ProtoMessage
- CountTokensResponse
Constructors
-
CountTokensResponse({int totalTokens = 0, int cachedContentTokenCount = 0, List<
ModalityTokenCount> promptTokensDetails = const [], List<ModalityTokenCount> cacheTokensDetails = const []}) - CountTokensResponse.fromJson(Object? j)
-
factory
Properties
- cachedContentTokenCount → int
-
Number of tokens in the cached part of the prompt (the cached content).
final
-
cacheTokensDetails
→ List<
ModalityTokenCount> -
Output only. List of modalities that were processed in the cached content.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
promptTokensDetails
→ List<
ModalityTokenCount> -
Output only. List of modalities that were processed in the request input.
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalTokens → int
-
The number of tokens that the
Modeltokenizes thepromptinto. Always non-negative.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String