pub struct StdOutCallbackHandler {
pub color: Option<String>,
}Expand description
Callback Handler that prints to stdout.
Fields§
§color: Option<String>The color to use for the text.
Implementations§
Trait Implementations§
Source§impl BaseCallbackHandler for StdOutCallbackHandler
impl BaseCallbackHandler for StdOutCallbackHandler
Source§fn name(&self) -> &str
fn name(&self) -> &str
Get a unique name for this handler.
Note: This is a Rust-specific addition for debugging purposes.
Source§fn raise_error(&self) -> bool
fn raise_error(&self) -> bool
Whether to raise an error if an exception occurs.
Source§fn run_inline(&self) -> bool
fn run_inline(&self) -> bool
Whether to run the callback inline.
Source§fn ignore_llm(&self) -> bool
fn ignore_llm(&self) -> bool
Whether to ignore LLM callbacks.
Source§fn ignore_retry(&self) -> bool
fn ignore_retry(&self) -> bool
Whether to ignore retry callbacks.
Source§fn ignore_chain(&self) -> bool
fn ignore_chain(&self) -> bool
Whether to ignore chain callbacks.
Source§fn ignore_agent(&self) -> bool
fn ignore_agent(&self) -> bool
Whether to ignore agent callbacks.
Source§fn ignore_retriever(&self) -> bool
fn ignore_retriever(&self) -> bool
Whether to ignore retriever callbacks.
Source§fn ignore_chat_model(&self) -> bool
fn ignore_chat_model(&self) -> bool
Whether to ignore chat model callbacks.
Source§fn ignore_custom_event(&self) -> bool
fn ignore_custom_event(&self) -> bool
Whether to ignore custom events.
Source§impl CallbackManagerMixin for StdOutCallbackHandler
impl CallbackManagerMixin for StdOutCallbackHandler
Source§fn on_chain_start(
&mut self,
serialized: &HashMap<String, Value>,
_inputs: &HashMap<String, Value>,
_run_id: Uuid,
_parent_run_id: Option<Uuid>,
_tags: Option<&[String]>,
metadata: Option<&HashMap<String, Value>>,
)
fn on_chain_start( &mut self, serialized: &HashMap<String, Value>, _inputs: &HashMap<String, Value>, _run_id: Uuid, _parent_run_id: Option<Uuid>, _tags: Option<&[String]>, metadata: Option<&HashMap<String, Value>>, )
Run when a chain starts running.
Source§fn on_llm_start(
&mut self,
serialized: &HashMap<String, Value>,
prompts: &[String],
run_id: Uuid,
parent_run_id: Option<Uuid>,
tags: Option<&[String]>,
metadata: Option<&HashMap<String, Value>>,
)
fn on_llm_start( &mut self, serialized: &HashMap<String, Value>, prompts: &[String], run_id: Uuid, parent_run_id: Option<Uuid>, tags: Option<&[String]>, metadata: Option<&HashMap<String, Value>>, )
Run when LLM starts running.
Source§fn on_chat_model_start(
&mut self,
serialized: &HashMap<String, Value>,
messages: &[Vec<BaseMessage>],
run_id: Uuid,
parent_run_id: Option<Uuid>,
tags: Option<&[String]>,
metadata: Option<&HashMap<String, Value>>,
)
fn on_chat_model_start( &mut self, serialized: &HashMap<String, Value>, messages: &[Vec<BaseMessage>], run_id: Uuid, parent_run_id: Option<Uuid>, tags: Option<&[String]>, metadata: Option<&HashMap<String, Value>>, )
Run when a chat model starts running.
Source§impl ChainManagerMixin for StdOutCallbackHandler
impl ChainManagerMixin for StdOutCallbackHandler
Source§fn on_chain_end(
&mut self,
_outputs: &HashMap<String, Value>,
_run_id: Uuid,
_parent_run_id: Option<Uuid>,
)
fn on_chain_end( &mut self, _outputs: &HashMap<String, Value>, _run_id: Uuid, _parent_run_id: Option<Uuid>, )
Run when chain ends running.
Source§fn on_agent_action(
&mut self,
action: &Value,
_run_id: Uuid,
_parent_run_id: Option<Uuid>,
color: Option<&str>,
)
fn on_agent_action( &mut self, action: &Value, _run_id: Uuid, _parent_run_id: Option<Uuid>, color: Option<&str>, )
Run on agent action.
Source§impl Clone for StdOutCallbackHandler
impl Clone for StdOutCallbackHandler
Source§fn clone(&self) -> StdOutCallbackHandler
fn clone(&self) -> StdOutCallbackHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StdOutCallbackHandler
impl Debug for StdOutCallbackHandler
Source§impl Default for StdOutCallbackHandler
impl Default for StdOutCallbackHandler
Source§impl LLMManagerMixin for StdOutCallbackHandler
impl LLMManagerMixin for StdOutCallbackHandler
Source§fn on_llm_new_token(
&mut self,
token: &str,
run_id: Uuid,
parent_run_id: Option<Uuid>,
chunk: Option<&Value>,
)
fn on_llm_new_token( &mut self, token: &str, run_id: Uuid, parent_run_id: Option<Uuid>, chunk: Option<&Value>, )
Run on new output token. Only available when streaming is enabled.
Source§fn on_llm_end(
&mut self,
response: &ChatResult,
run_id: Uuid,
parent_run_id: Option<Uuid>,
)
fn on_llm_end( &mut self, response: &ChatResult, run_id: Uuid, parent_run_id: Option<Uuid>, )
Run when LLM ends running.
Source§impl RunManagerMixin for StdOutCallbackHandler
impl RunManagerMixin for StdOutCallbackHandler
Auto Trait Implementations§
impl Freeze for StdOutCallbackHandler
impl RefUnwindSafe for StdOutCallbackHandler
impl Send for StdOutCallbackHandler
impl Sync for StdOutCallbackHandler
impl Unpin for StdOutCallbackHandler
impl UnwindSafe for StdOutCallbackHandler
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