#[non_exhaustive]pub enum ChatDelta {
Text(String),
Reasoning(String),
ToolCall {
index: usize,
id: Option<String>,
name: Option<String>,
arguments: String,
},
Usage(Usage),
Finish(FinishReason),
ProviderState(Value),
Warning(String),
}Expand description
One streamed increment.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text(String)
Visible answer text.
Reasoning(String)
Reasoning / thinking text.
ToolCall
Fragment of a tool call. Fragments sharing index belong to the same call;
id and name usually arrive on the first fragment only.
Usage(Usage)
Cumulative usage snapshot; the last one wins.
Finish(FinishReason)
ProviderState(Value)
Opaque provider state for the assistant message; the last one wins.
Warning(String)
Something the provider adapter changed or dropped while translating the request (e.g. unsupported JSON Schema keywords). Surfaced in node metadata.
Trait Implementations§
impl StructuralPartialEq for ChatDelta
Auto Trait Implementations§
impl Forget for ChatDelta
impl Freeze for ChatDelta
impl Move for ChatDelta
impl RefUnwindSafe for ChatDelta
impl Send for ChatDelta
impl Sync for ChatDelta
impl Unpin for ChatDelta
impl UnsafeUnpin for ChatDelta
impl UnwindSafe for ChatDelta
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