pub enum OutputEvent {
Started {
id: u64,
kind: OutputKind,
},
Delta {
id: u64,
text: String,
},
Completed {
id: u64,
text: String,
},
Answer {
replaces: Option<u64>,
text: String,
},
Discard {
ids: Vec<u64>,
},
}Expand description
One change to the model output an agent streams while its turn runs.
Items are numbered in the order they start. Hosts render them transiently and replace them with the persisted turn result when the turn ends; the output is session content, never telemetry, and is never replayed to a provider.
Variants§
Started
Item id started; its fragments and completion follow.
Delta
A fragment of display text appended to message or reasoning item
id; tool calls stream no fragments.
Completed
Item id finished, and text replaces its fragments. A tool call
finishes once its arguments are complete and carries no text.
Fields
§
id: u64Identifier of the item, as Self::Started reported it.
Answer
The turn’s validated final answer.
Fields
Discard
Items that belong to a discarded response, or that the turn left unfinished, are void.
Trait Implementations§
Source§impl Clone for OutputEvent
impl Clone for OutputEvent
Source§impl Debug for OutputEvent
impl Debug for OutputEvent
impl Eq for OutputEvent
Source§impl PartialEq for OutputEvent
impl PartialEq for OutputEvent
impl StructuralPartialEq for OutputEvent
Auto Trait Implementations§
impl Forget for OutputEvent
impl Freeze for OutputEvent
impl Move for OutputEvent
impl RefUnwindSafe for OutputEvent
impl Send for OutputEvent
impl Sync for OutputEvent
impl Unpin for OutputEvent
impl UnsafeUnpin for OutputEvent
impl UnwindSafe for OutputEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.