Crig::Providers::OpenRouter::Usage
Inherits Crig::Completion::GetTokenUsage < JSON::Serializable < Struct < Value < Object
Constructors
new(prompt_tokens : Int32, total_tokens : Int32, completion_tokens : Int32 = 0, cost : Float64 = 0.0, prompt_tokens_details : PromptTokensDetails | Nil = nil)
Sourcenew(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
completion_tokens
Sourcecost
Sourceprompt_tokens
Sourceprompt_tokens_details
Sourcetoken_usage
Sourcetotal_tokens
Source