pub struct ConsoleCallbackHandler {
pub color: Option<String>,
}
Expand description
A simple console callback handler for debugging
Fields§
§color: Option<String>
The color to use for text output (matching LangChain’s color scheme)
Implementations§
Trait Implementations§
Source§impl CallbackHandler for ConsoleCallbackHandler
impl CallbackHandler for ConsoleCallbackHandler
Source§fn on_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
input: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
input: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a runnable starts
Source§fn on_success<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
output: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_success<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
output: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a runnable completes successfully
Source§fn on_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
error: &'life2 FerricLinkError,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
error: &'life2 FerricLinkError,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a runnable fails
Source§fn on_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
chunk: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
chunk: &'life2 Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a runnable produces streaming output
Auto Trait Implementations§
impl Freeze for ConsoleCallbackHandler
impl RefUnwindSafe for ConsoleCallbackHandler
impl Send for ConsoleCallbackHandler
impl Sync for ConsoleCallbackHandler
impl Unpin for ConsoleCallbackHandler
impl UnwindSafe for ConsoleCallbackHandler
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