Trait MessageHookFn

Source
pub trait MessageHookFn:
    for<'a> Fn(&'a Agent, &mut ChatMessage) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
    + Send
    + Sync
    + DynClone { }
Expand description

Hooks that are called when a new message is added to the AgentContext

Implementors§

Source§

impl<F> MessageHookFn for F
where F: for<'a> Fn(&'a Agent, &mut ChatMessage) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>> + Send + Sync + DynClone,