pub struct Turn {Show 14 fields
pub number: u32,
pub opened: Seq,
pub t: TimeMs,
pub timing: Timing,
pub first_at: Option<TimeMs>,
pub returned: Option<TimeMs>,
pub model: Option<String>,
pub said: Option<String>,
pub thought: Option<String>,
pub spent: Option<UsdMicros>,
pub used: Option<Used>,
pub stopped: Option<String>,
pub calls: Vec<Call>,
pub notes: Vec<Note>,
}Expand description
One turn: the model was asked, and this is what came of it.
Fields§
§number: u32Counted from one, in the order the turns opened.
opened: SeqThe event that opened it.
t: TimeMsWhen the Ledger wrote the event opened names.
Read from that record rather than from a clock consulted here: the Ledger is the authority on when a thing happened and this field is a projection of it, so a session replayed tomorrow reports the times it originally had rather than the times it was replayed.
Whether it is the moment the model was asked, or the stamp a
ledger written before per-line moments gave every line of the
turn, is Turn::timing.
Not optional, unlike crate::LogLine::t. A log line is written
beside the Ledger and can find the clock unreadable; a turn is
folded from an EventRecord, which carries a reading in every
case. An Option here would be a state no fold can produce and
every reader would still have to answer.
timing: TimingWhether Turn::t is the moment the model was asked.
first_at: Option<TimeMs>When the reply’s first content reached the city, as the turn’s
model_returned recorded it; the time to first content is this
minus Turn::t. None when the reply had no stream, streamed
only tool calls, or was written before the key existed - the page
then draws no figure rather than a guessed one.
returned: Option<TimeMs>When the reply that answered this turn was whole, as that
model_returned measured its own moment
(kernel::event::moment). The output rate is
used.output over returned - first_at. None when no reply
answered in this window and when the reply’s line measured no
moment of its own - the envelope stamp of such a line is the
turn’s, and a rate drawn from it would be invented.
model: Option<String>The endpoint’s model id the model_called that opened this turn
recorded. Per turn because a session can change model midway,
and a name for the whole session would be wrong for half of it.
None when that record carries no model name as text; the page
then draws no name rather than a guessed one.
said: Option<String>What the model said in this turn: its prose, without the reasoning that produced it.
thought: Option<String>What the model reasoned in this turn, when the provider sent it.
A field of its own rather than part of said, because a page
folds the two differently and a person asked for an answer.
spent: Option<UsdMicros>What this one turn was billed.
used: Option<Used>§stopped: Option<String>Why the model stopped, in the provider’s own word.
calls: Vec<Call>§notes: Vec<Note>What else happened inside this turn, oldest first.