pub struct StdOutHandler { /* private fields */ }Expand description
Standard output callback handler
Prints trace information to console for debugging.
Implementations§
Source§impl StdOutHandler
impl StdOutHandler
Sourcepub fn with_verbose(self, verbose: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
Sets whether verbose output is enabled.
Trait Implementations§
Source§impl CallbackHandler for StdOutHandler
impl CallbackHandler for StdOutHandler
Source§fn on_run_start<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_run_start<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when any run starts
Source§fn on_run_end<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_run_end<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when a run ends successfully
Source§fn on_run_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_run_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a run fails
Source§fn on_llm_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
messages: &'life2 [Message],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_llm_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
messages: &'life2 [Message],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when an LLM starts
Source§fn on_llm_new_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_run: &'life1 RunTree,
token: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_llm_new_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_run: &'life1 RunTree,
token: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called for each new token during streaming
Source§fn on_tool_start<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
tool_name: &'life2 str,
input: &'life3 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn on_tool_start<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
tool_name: &'life2 str,
input: &'life3 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Called when a tool starts
Source§fn on_retriever_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
query: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_retriever_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
query: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a retriever starts
Source§fn on_retriever_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
documents: &'life2 [Value],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_retriever_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
documents: &'life2 [Value],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a retriever ends
Source§fn on_llm_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
_response: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_llm_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
_response: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when an LLM ends
Source§fn on_llm_thinking<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_run: &'life1 RunTree,
_thinking: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_llm_thinking<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_run: &'life1 RunTree,
_thinking: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called for each thinking token during streaming (extended thinking). Read more
Source§fn on_llm_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_llm_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when an LLM errors
Source§fn on_chain_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
_inputs: &'life2 Value,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_chain_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
_inputs: &'life2 Value,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a chain starts
Source§fn on_chain_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
_outputs: &'life2 Value,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_chain_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
_outputs: &'life2 Value,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a chain ends
Source§fn on_chain_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_chain_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a chain errors
Source§fn on_tool_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
_output: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_tool_end<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
_output: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a tool ends
Source§fn on_tool_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_tool_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a tool errors
Source§fn on_retriever_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_retriever_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run: &'life1 RunTree,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called when a retriever errors
Auto Trait Implementations§
impl Freeze for StdOutHandler
impl RefUnwindSafe for StdOutHandler
impl Send for StdOutHandler
impl Sync for StdOutHandler
impl Unpin for StdOutHandler
impl UnsafeUnpin for StdOutHandler
impl UnwindSafe for StdOutHandler
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