pub enum ModelEventKind {
Started {
provenance: ModelResponseProvenance,
},
OutputStarted {
output_index: ExecutionCount,
start: Box<ModelOutputStart>,
},
OutputDelta {
output_index: ExecutionCount,
delta: ModelOutputDelta,
},
OutputCompleted {
output_index: ExecutionCount,
},
UsageUpdated {
usage: ModelUsage,
},
Completed {
finish_reason: ModelFinishReason,
usage: ModelUsage,
extensions: Extensions,
},
}Expand description
Closed semantic body of a provider-neutral model event.
Variants§
Started
Opens one attempt stream and fixes response provenance.
Fields
provenance: ModelResponseProvenanceAttempt and exact model identity plus optional provider correlation IDs.
OutputStarted
Registers the next ordered output item and its immutable header.
Fields
output_index: ExecutionCountZero-based final-response output position.
start: Box<ModelOutputStart>Typed output header.
OutputDelta
Appends an exact fragment to an active output item.
Fields
output_index: ExecutionCountPreviously registered output position.
delta: ModelOutputDeltaTyped non-empty fragment.
OutputCompleted
Closes and validates one active output item.
Fields
output_index: ExecutionCountPreviously registered output position.
UsageUpdated
Reports a complete cumulative usage snapshot observed so far.
Fields
usage: ModelUsageInclusive, normalized, monotonic per-attempt token accounting.
Completed
Terminates the stream and supplies authoritative final accounting.
Fields
finish_reason: ModelFinishReasonPortable successful or incomplete terminal reason.
usage: ModelUsageAuthoritative inclusive token accounting for the whole attempt.
extensions: ExtensionsBounded registered provider/adapter terminal metadata.
Trait Implementations§
Source§impl Clone for ModelEventKind
impl Clone for ModelEventKind
Source§impl Debug for ModelEventKind
impl Debug for ModelEventKind
Source§impl<'de> Deserialize<'de> for ModelEventKind
impl<'de> Deserialize<'de> for ModelEventKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ModelEventKind
Source§impl JsonSchema for ModelEventKind
impl JsonSchema for ModelEventKind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more