pub struct HandlerBuilder { /* private fields */ }Expand description
Build a CallbackHandler from any subset of closures. Methods not
configured fall through to the trait’s no-op defaults.
Implementations§
Source§impl HandlerBuilder
impl HandlerBuilder
Sourcepub fn on_chain_start<F>(self, f: F) -> Self
pub fn on_chain_start<F>(self, f: F) -> Self
Set the on_chain_start closure.
Sourcepub fn on_chain_end<F>(self, f: F) -> Self
pub fn on_chain_end<F>(self, f: F) -> Self
Set the on_chain_end closure.
Sourcepub fn on_chain_error<F>(self, f: F) -> Self
pub fn on_chain_error<F>(self, f: F) -> Self
Set the on_chain_error closure.
Sourcepub fn on_llm_start<F>(self, f: F) -> Self
pub fn on_llm_start<F>(self, f: F) -> Self
Set the on_llm_start closure.
Sourcepub fn on_llm_token<F>(self, f: F) -> Self
pub fn on_llm_token<F>(self, f: F) -> Self
Set the on_llm_token closure.
Sourcepub fn on_llm_end<F>(self, f: F) -> Self
pub fn on_llm_end<F>(self, f: F) -> Self
Set the on_llm_end closure.
Sourcepub fn on_llm_error<F>(self, f: F) -> Self
pub fn on_llm_error<F>(self, f: F) -> Self
Set the on_llm_error closure.
Sourcepub fn on_tool_start<F>(self, f: F) -> Self
pub fn on_tool_start<F>(self, f: F) -> Self
Set the on_tool_start closure.
Sourcepub fn on_tool_end<F>(self, f: F) -> Self
pub fn on_tool_end<F>(self, f: F) -> Self
Set the on_tool_end closure.
Sourcepub fn on_tool_error<F>(self, f: F) -> Self
pub fn on_tool_error<F>(self, f: F) -> Self
Set the on_tool_error closure.
Sourcepub fn on_node_start<F>(self, f: F) -> Self
pub fn on_node_start<F>(self, f: F) -> Self
Set the on_node_start closure.
Sourcepub fn on_node_end<F>(self, f: F) -> Self
pub fn on_node_end<F>(self, f: F) -> Self
Set the on_node_end closure.
Sourcepub fn on_checkpoint<F>(self, f: F) -> Self
pub fn on_checkpoint<F>(self, f: F) -> Self
Set the on_checkpoint closure.
Sourcepub fn build(self) -> BuiltHandler
pub fn build(self) -> BuiltHandler
Finalize.
Trait Implementations§
Source§impl Default for HandlerBuilder
impl Default for HandlerBuilder
Source§fn default() -> HandlerBuilder
fn default() -> HandlerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HandlerBuilder
impl !RefUnwindSafe for HandlerBuilder
impl Send for HandlerBuilder
impl Sync for HandlerBuilder
impl Unpin for HandlerBuilder
impl UnsafeUnpin for HandlerBuilder
impl !UnwindSafe for HandlerBuilder
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