Smith::Stats::Aggregate
Inherits Struct < Value < Object
The total over all sessions. Entries without recorded usage contribute to the session count and nothing else; entries with an unknown rate contribute tokens but no cost.
Constructors
new
SourceInstance methods
by_model
Sourceby_model=(by_model : Array(ModelStat))
Sourcecache_creation_tokens
Sourcecache_creation_tokens=(cache_creation_tokens : Int64)
Sourcecache_read_tokens
Sourcecache_read_tokens=(cache_read_tokens : Int64)
Sourcecached_tokens
Sourcecompletion_tokens
Sourcecompletion_tokens=(completion_tokens : Int64)
Sourcecost
nil when no session has a known rate — the honest answer is n/a,
not zero. Only Stats.aggregate writes these; everyone else reads.
cost=(cost : Float64 | Nil)
nil when no session has a known rate — the honest answer is n/a,
not zero. Only Stats.aggregate writes these; everyone else reads.
initialize
Sourceprompt_tokens
Sourceprompt_tokens=(prompt_tokens : Int64)
Sourcesessions
Sourcesessions=(sessions : Int32)
Sourcetotal_tokens
Sourcewith_usage
Sourcewith_usage=(with_usage : Int32)
Source