pub struct Used {
pub input: Tokens,
pub output: Tokens,
pub cached: Option<Tokens>,
pub cache_write: Option<Tokens>,
pub first_us: Option<u64>,
pub took_us: Option<u64>,
}Expand description
What one turn cost in tokens.
Absolute counts and no ratio: the numerator is on the wire and the
denominator - this model’s context window - is not. A percentage with
no denominator is the thing UnplannedProgress already refuses to
spell, and it would be no more honest here.
Fields§
§input: Tokens§output: Tokens§cached: Option<Tokens>The part of input read from the provider’s cache
(kernel::ModelUsage::cache_read_tokens); None when the provider
did not report it, which a page shows as unknown rather than zero
(crates/wire/spec/Reading.lean D35).
cache_write: Option<Tokens>The part of input written into the provider’s cache
(kernel::ModelUsage::cache_write_tokens), priced apart from a
read. None when the provider did not report it, and in a frame
from a city written before it was answered (crates/wire/Spec.lean
D13, D35).
first_us: Option<u64>Whole microseconds from the attempt going out to the reply’s first
content, as model_returned.first_us recorded it (kernel D20).
None on a line written before the key existed, and wherever
Turn::first_at is None.
took_us: Option<u64>Whole microseconds from the attempt going out to the reply being
whole, as model_returned.took_us recorded it. None on a line
written before the key existed: a page then shows the difference
of the moments, in milliseconds (crates/wire/spec/Reading.lean D28).