struct

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

Instance methods

by_model
Source
by_model=(by_model : Array(ModelStat))
Source
cache_creation_tokens
Source
cache_creation_tokens=(cache_creation_tokens : Int64)
Source
cache_read_tokens
Source
cache_read_tokens=(cache_read_tokens : Int64)
Source
cached_tokens
Source
completion_tokens
Source
completion_tokens=(completion_tokens : Int64)
Source
cost

nil when no session has a known rate — the honest answer is n/a, not zero. Only Stats.aggregate writes these; everyone else reads.

Source
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.

Source
initialize
Source
prompt_tokens
Source
prompt_tokens=(prompt_tokens : Int64)
Source
sessions
Source
sessions=(sessions : Int32)
Source
total_tokens
Source
with_usage
Source
with_usage=(with_usage : Int32)
Source