struct

AI::Google::UsageMetadata

Inherits JSON::Serializable < Struct < Value < Object

Google Generative AI usage metadata from the API response.

Constructors

new(prompt_token_count : Int32 | Nil = nil, candidates_token_count : Int32 | Nil = nil, total_token_count : Int32 | Nil = nil, cached_content_token_count : Int32 | Nil = nil, thoughts_token_count : Int32 | Nil = nil, traffic_type : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

cached_content_token_count
Source
candidates_token_count
Source
prompt_token_count
Source
thoughts_token_count
Source
total_token_count
Source
traffic_type
Source