pub struct ToolErrorRecoveryMiddleware;Trait Implementations§
Source§impl AgentMiddleware for ToolErrorRecoveryMiddleware
impl AgentMiddleware for ToolErrorRecoveryMiddleware
fn after_tool_call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
result: &'life2 mut Result<Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn before_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_agent_id: &'life1 AgentId,
_user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn before_model_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch: &'life1 mut ExecuteBatch,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn after_model_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_result: &'life1 mut TurnResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_tool_call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_args: &'life2 mut Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
_result: &'life1 mut TurnResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn dynamic_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_agent_id: &'life1 AgentId,
_user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn dynamic_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_agent_id: &'life1 AgentId,
_user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
If
Some, replaces the rendered system prompt for this turn.Auto Trait Implementations§
impl Freeze for ToolErrorRecoveryMiddleware
impl RefUnwindSafe for ToolErrorRecoveryMiddleware
impl Send for ToolErrorRecoveryMiddleware
impl Sync for ToolErrorRecoveryMiddleware
impl Unpin for ToolErrorRecoveryMiddleware
impl UnsafeUnpin for ToolErrorRecoveryMiddleware
impl UnwindSafe for ToolErrorRecoveryMiddleware
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