pub enum AgentError<M: Error + 'static> {
Completion(M),
Tool(ToolError),
MaxIterations(u32),
}Expand description
Errors that can occur while running the agentic loop.
Not using #[from] on both variants because when M = ToolError the
blanket impls would conflict. Instead, conversions are explicit at the
call sites inside Agent.
Variants§
Completion(M)
Tool(ToolError)
MaxIterations(u32)
The model kept issuing tool calls beyond the iteration cap.
Trait Implementations§
Source§impl<M> Display for AgentError<M>
impl<M> Display for AgentError<M>
Source§impl<M: Error + 'static> Error for AgentError<M>
impl<M: Error + 'static> Error for AgentError<M>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl<M> !RefUnwindSafe for AgentError<M>
impl<M> !UnwindSafe for AgentError<M>
impl<M> Freeze for AgentError<M>where
M: Freeze,
impl<M> Send for AgentError<M>where
M: Send,
impl<M> Sync for AgentError<M>where
M: Sync,
impl<M> Unpin for AgentError<M>where
M: Unpin,
impl<M> UnsafeUnpin for AgentError<M>where
M: UnsafeUnpin,
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