pub enum CompletionEvent {
TextChunk(String),
Action(CompletionAction),
SyncToolCall {
tool_name: String,
tool_args: Value,
display_as: Option<String>,
},
ThinkingStart,
ThinkingEnd,
ThinkingChunk(String),
SyncToolResult(ToolResult),
Info(String),
}Expand description
Items yielded by the completion stream.
Variants§
TextChunk(String)
A chunk of text from the model.
Action(CompletionAction)
The terminal event — what to do next.
SyncToolCall
A tool call that was synchronously processed.
ThinkingStart
The model has started thinking (reasoning).
ThinkingEnd
The model has stopped thinking (reasoning).
ThinkingChunk(String)
A chunk of thinking/reasoning text from the model.
SyncToolResult(ToolResult)
A synchronous tool result.
Info(String)
Some piece of information to log to the user.
Auto Trait Implementations§
impl Freeze for CompletionEvent
impl RefUnwindSafe for CompletionEvent
impl Send for CompletionEvent
impl Sync for CompletionEvent
impl Unpin for CompletionEvent
impl UnsafeUnpin for CompletionEvent
impl UnwindSafe for CompletionEvent
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