struct
AI::Google::UsageMetadata
- AI::Google::UsageMetadata
- Struct
- Value
- Object
Overview
Google Generative AI usage metadata from the API response.
Included Modules
- JSON::Serializable
Defined in:
ai/google/convert_usage.crConstructors
- .new(pull : JSON::PullParser)
- .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)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
- #cached_content_token_count : Int32 | Nil
- #candidates_token_count : Int32 | Nil
- #prompt_token_count : Int32 | Nil
- #thoughts_token_count : Int32 | Nil
- #total_token_count : Int32 | Nil
- #traffic_type : String | Nil
Constructor Detail
def self.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)
#