pub enum AssistantEvent {
ModelServed {
model_id: String,
local_last_resort: bool,
},
Text(String),
ToolCall {
name: String,
params: Value,
},
ToolResult {
name: String,
ok: bool,
content: String,
},
Done {
text: String,
},
Error(String),
GoalEvaluated {
iteration: u32,
met: bool,
grounded: bool,
reason: String,
},
}Expand description
Streamed events from one loop run. emit is called synchronously as the loop
progresses; a chat caller forwards these to agent.chat.event, a CLI caller
prints them.
Variants§
ModelServed
Attribution for one completed model turn. Emitted before that turn’s text/tool events so every rendered answer can be tied to its actual serving model, including transparent on-device degradation.
Text(String)
The model’s free-text for a turn (may be empty when it only calls tools).
ToolCall
A tool is about to run.
ToolResult
A tool finished. ok is false for a failed/denied call.
Done
Terminal: the model answered with no further tool calls.
Error(String)
Terminal: the run failed (inference/transport error).
GoalEvaluated
Goal-loop verifier result after one iteration. This surfaces CAR’s grounded completion evidence to CLI/chat hosts instead of hiding it in tracing logs.
Auto Trait Implementations§
impl Freeze for AssistantEvent
impl RefUnwindSafe for AssistantEvent
impl Send for AssistantEvent
impl Sync for AssistantEvent
impl Unpin for AssistantEvent
impl UnsafeUnpin for AssistantEvent
impl UnwindSafe for AssistantEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more