pub enum LoopEvent {
StepStart {
step: usize,
},
Decision(Decision),
ToolResult {
name: String,
output: String,
},
Completed {
steps: usize,
},
LoopDetected {
count: usize,
},
Error(AgentError),
WaitingForInput {
question: String,
tool_call_id: String,
},
MaxOutputTokensRecovery {
attempt: usize,
},
PromptTooLong {
message: String,
},
ContextModified {
tool_name: String,
},
}Expand description
Events emitted during the agent loop.
Variants§
StepStart
Decision(Decision)
ToolResult
Completed
LoopDetected
Error(AgentError)
WaitingForInput
Agent needs user input. Content is the question.
MaxOutputTokensRecovery
Response was truncated, requesting auto-continuation.
PromptTooLong
Prompt exceeded model’s context limit.
ContextModified
A tool returned a context modifier that was applied.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoopEvent
impl !RefUnwindSafe for LoopEvent
impl Send for LoopEvent
impl Sync for LoopEvent
impl Unpin for LoopEvent
impl UnsafeUnpin for LoopEvent
impl !UnwindSafe for LoopEvent
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