__init__() — langchain Function Reference
Architecture documentation for the __init__() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD fb255192_5aed_e5e5_8ecd_b7e483ab04e3["__init__()"] 24bc19d6_d1f4_bd59_6fc4_6ef5b08a4d41["BaseCallbackManager"] fb255192_5aed_e5e5_8ecd_b7e483ab04e3 -->|defined in| 24bc19d6_d1f4_bd59_6fc4_6ef5b08a4d41 style fb255192_5aed_e5e5_8ecd_b7e483ab04e3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/callbacks/base.py lines 901–931
def __init__(
self,
handlers: list[BaseCallbackHandler],
inheritable_handlers: list[BaseCallbackHandler] | None = None,
parent_run_id: UUID | None = None,
*,
tags: list[str] | None = None,
inheritable_tags: list[str] | None = None,
metadata: dict[str, Any] | None = None,
inheritable_metadata: dict[str, Any] | None = None,
) -> None:
"""Initialize callback manager.
Args:
handlers: The handlers.
inheritable_handlers: The inheritable handlers.
parent_run_id: The parent run ID.
tags: The tags.
inheritable_tags: The inheritable tags.
metadata: The metadata.
inheritable_metadata: The inheritable metadata.
"""
self.handlers: list[BaseCallbackHandler] = handlers
self.inheritable_handlers: list[BaseCallbackHandler] = (
inheritable_handlers or []
)
self.parent_run_id: UUID | None = parent_run_id
self.tags = tags or []
self.inheritable_tags = inheritable_tags or []
self.metadata = metadata or {}
self.inheritable_metadata = inheritable_metadata or {}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is __init__() defined?
__init__() is defined in libs/core/langchain_core/callbacks/base.py at line 901.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free