Gemini::GenerateContentResponse::UsageMetadata
Inherits JSON::Serializable < Struct < Value < Object
Metadata on the generation request's token usage.
Constructors
new(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
cached_content_token_count
Number of tokens in the cached part of the prompt (the cached content)
prompt_token_count
Number of tokens in the prompt. When cachedContent is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.
total_token_count
Total token count for the generation request (prompt + response candidates).