BaseCallbackHandler

Trait BaseCallbackHandler 

Source
pub trait BaseCallbackHandler:
    LLMManagerMixin
    + ChainManagerMixin
    + ToolManagerMixin
    + RetrieverManagerMixin
    + CallbackManagerMixin
    + RunManagerMixin
    + Send
    + Sync
    + Debug {
    // Provided methods
    fn raise_error(&self) -> bool { ... }
    fn run_inline(&self) -> bool { ... }
    fn ignore_llm(&self) -> bool { ... }
    fn ignore_retry(&self) -> bool { ... }
    fn ignore_chain(&self) -> bool { ... }
    fn ignore_agent(&self) -> bool { ... }
    fn ignore_retriever(&self) -> bool { ... }
    fn ignore_chat_model(&self) -> bool { ... }
    fn ignore_custom_event(&self) -> bool { ... }
    fn name(&self) -> &str { ... }
}
Expand description

Base callback handler for LangChain.

This trait combines all the mixin traits and provides the base interface for callback handlers. Handlers can override specific methods they care about.

Provided Methods§

Source

fn raise_error(&self) -> bool

Whether to raise an error if an exception occurs.

Source

fn run_inline(&self) -> bool

Whether to run the callback inline.

Source

fn ignore_llm(&self) -> bool

Whether to ignore LLM callbacks.

Source

fn ignore_retry(&self) -> bool

Whether to ignore retry callbacks.

Source

fn ignore_chain(&self) -> bool

Whether to ignore chain callbacks.

Source

fn ignore_agent(&self) -> bool

Whether to ignore agent callbacks.

Source

fn ignore_retriever(&self) -> bool

Whether to ignore retriever callbacks.

Source

fn ignore_chat_model(&self) -> bool

Whether to ignore chat model callbacks.

Source

fn ignore_custom_event(&self) -> bool

Whether to ignore custom events.

Source

fn name(&self) -> &str

Get a unique name for this handler. Note: This is a Rust-specific addition for debugging purposes.

Implementors§