pub struct Hooks {
pub on_start: HookList<StartEvent>,
pub on_step_start: HookList<StepStartEvent>,
pub on_language_model_call_start: HookList<ModelCallStartEvent>,
pub on_language_model_call_end: HookList<ModelCallEndEvent>,
pub on_tool_execution_start: HookList<ToolExecutionStartEvent>,
pub on_tool_execution_end: HookList<ToolExecutionEndEvent>,
pub on_step_end: HookList<StepResult>,
pub on_end: HookList<EndEvent>,
pub on_chunk: HookList<StreamEvent>,
pub on_abort: HookList<AbortEvent>,
}Expand description
All lifecycle hooks of a call.
Fields§
§on_start: HookList<StartEvent>The call started.
on_step_start: HookList<StepStartEvent>A step started.
on_language_model_call_start: HookList<ModelCallStartEvent>A model call is about to be made.
on_language_model_call_end: HookList<ModelCallEndEvent>A model call finished (tool calls parsed, not yet executed).
on_tool_execution_start: HookList<ToolExecutionStartEvent>A tool execution started.
on_tool_execution_end: HookList<ToolExecutionEndEvent>A tool execution finished.
on_step_end: HookList<StepResult>A step finished.
on_end: HookList<EndEvent>The call finished.
on_chunk: HookList<StreamEvent>Streaming: an event was emitted.
on_abort: HookList<AbortEvent>Streaming: the call was aborted.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Hooks
impl !UnwindSafe for Hooks
impl Freeze for Hooks
impl Send for Hooks
impl Sync for Hooks
impl Unpin for Hooks
impl UnsafeUnpin for Hooks
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