set_handlers() — langchain Function Reference
Architecture documentation for the set_handlers() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD d3ca4cfe_17d5_f870_d94f_bf0e7595143d["set_handlers()"] 24bc19d6_d1f4_bd59_6fc4_6ef5b08a4d41["BaseCallbackManager"] d3ca4cfe_17d5_f870_d94f_bf0e7595143d -->|defined in| 24bc19d6_d1f4_bd59_6fc4_6ef5b08a4d41 dc60ed36_69b4_1b87_0566_ea201ad6cd90["set_handler()"] dc60ed36_69b4_1b87_0566_ea201ad6cd90 -->|calls| d3ca4cfe_17d5_f870_d94f_bf0e7595143d 14741891_16ac_1712_0f46_0c996f33bf5f["add_handler()"] d3ca4cfe_17d5_f870_d94f_bf0e7595143d -->|calls| 14741891_16ac_1712_0f46_0c996f33bf5f style d3ca4cfe_17d5_f870_d94f_bf0e7595143d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/callbacks/base.py lines 1032–1046
def set_handlers(
self,
handlers: list[BaseCallbackHandler],
inherit: bool = True, # noqa: FBT001,FBT002
) -> None:
"""Set handlers as the only handlers on the callback manager.
Args:
handlers: The handlers to set.
inherit: Whether to inherit the handlers.
"""
self.handlers = []
self.inheritable_handlers = []
for handler in handlers:
self.add_handler(handler, inherit=inherit)
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does set_handlers() do?
set_handlers() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is set_handlers() defined?
set_handlers() is defined in libs/core/langchain_core/callbacks/base.py at line 1032.
What does set_handlers() call?
set_handlers() calls 1 function(s): add_handler.
What calls set_handlers()?
set_handlers() is called by 1 function(s): set_handler.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free