Home / Function/ set_handler() — langchain Function Reference

set_handler() — langchain Function Reference

Architecture documentation for the set_handler() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  dc60ed36_69b4_1b87_0566_ea201ad6cd90["set_handler()"]
  24bc19d6_d1f4_bd59_6fc4_6ef5b08a4d41["BaseCallbackManager"]
  dc60ed36_69b4_1b87_0566_ea201ad6cd90 -->|defined in| 24bc19d6_d1f4_bd59_6fc4_6ef5b08a4d41
  d3ca4cfe_17d5_f870_d94f_bf0e7595143d["set_handlers()"]
  dc60ed36_69b4_1b87_0566_ea201ad6cd90 -->|calls| d3ca4cfe_17d5_f870_d94f_bf0e7595143d
  style dc60ed36_69b4_1b87_0566_ea201ad6cd90 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 1048–1059

    def set_handler(
        self,
        handler: BaseCallbackHandler,
        inherit: bool = True,  # noqa: FBT001,FBT002
    ) -> None:
        """Set handler as the only handler on the callback manager.

        Args:
            handler: The handler to set.
            inherit: Whether to inherit the handler.
        """
        self.set_handlers([handler], inherit=inherit)

Domain

Subdomains

Frequently Asked Questions

What does set_handler() do?
set_handler() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is set_handler() defined?
set_handler() is defined in libs/core/langchain_core/callbacks/base.py at line 1048.
What does set_handler() call?
set_handler() calls 1 function(s): set_handlers.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free