GenerateContentResponse_UsageMetadata class final
Metadata on the generation request's token usage.
- Inheritance
-
- Object
- ProtoMessage
- GenerateContentResponse_UsageMetadata
Constructors
-
GenerateContentResponse_UsageMetadata({int promptTokenCount = 0, int cachedContentTokenCount = 0, int candidatesTokenCount = 0, int toolUsePromptTokenCount = 0, int thoughtsTokenCount = 0, int totalTokenCount = 0, List<
ModalityTokenCount> promptTokensDetails = const [], List<ModalityTokenCount> cacheTokensDetails = const [], List<ModalityTokenCount> candidatesTokensDetails = const [], List<ModalityTokenCount> toolUsePromptTokensDetails = const []}) - GenerateContentResponse_UsageMetadata.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 of the cached content in the request
input.
final
- candidatesTokenCount → int
-
Total number of tokens across all the generated response candidates.
final
-
candidatesTokensDetails
→ List<
ModalityTokenCount> -
Output only. List of modalities that were returned in the response.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- promptTokenCount → int
-
Number of tokens in the prompt. When
cached_contentis set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.final -
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
- thoughtsTokenCount → int
-
Output only. Number of tokens of thoughts for thinking models.
final
- toolUsePromptTokenCount → int
-
Output only. Number of tokens present in tool-use prompt(s).
final
-
toolUsePromptTokensDetails
→ List<
ModalityTokenCount> -
Output only. List of modalities that were processed for tool-use request
inputs.
final
- totalTokenCount → int
-
Total token count for the generation request (prompt + response
candidates).
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