pub struct HookManager { /* private fields */ }Implementations§
Source§impl HookManager
impl HookManager
pub fn new() -> Self
pub fn add_hook<H: Hook + 'static>(&mut self, hook: H)
pub async fn on_agent_start(&self, query: &str) -> AgentResult<()>
pub async fn on_agent_end(&self, result: &str) -> AgentResult<()>
pub async fn on_agent_max_iteration(&self) -> AgentResult<()>
pub async fn on_step_start(&self, step: usize) -> AgentResult<()>
pub async fn on_step_end( &self, step: usize, message: &AssistantMessage, ) -> AgentResult<()>
pub async fn on_context_build( &self, query: &str, messages: &[ChatMessage], ) -> AgentResult<()>
pub async fn on_memory_search( &self, query: &str, results: &[ChatMessage], ) -> AgentResult<()>
pub async fn on_memory_add( &self, user: &str, assistant: &str, ) -> AgentResult<()>
pub async fn on_llm_start( &self, step: usize, messages: &[ChatMessage], ) -> AgentResult<()>
pub async fn on_llm_end( &self, step: usize, message: &AssistantMessage, ) -> AgentResult<()>
pub async fn on_tool_start( &self, step: usize, tool_call: &ToolCall, ) -> AgentResult<()>
pub async fn on_tool_end( &self, step: usize, result: &ToolCallResult, ) -> AgentResult<()>
pub async fn on_tool_error(&self, step: usize, context: &str) -> AgentResult<()>
Trait Implementations§
Source§impl Default for HookManager
impl Default for HookManager
Source§fn default() -> HookManager
fn default() -> HookManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for HookManager
impl !UnwindSafe for HookManager
impl Freeze for HookManager
impl Send for HookManager
impl Sync for HookManager
impl Unpin for HookManager
impl UnsafeUnpin for HookManager
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