struct

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)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

completion_tokens
Source
cost
Source
prompt_tokens
Source
prompt_tokens_details
Source
token_usage
Source
total_tokens
Source