__init__() — langchain Function Reference
Architecture documentation for the __init__() function in root_listeners.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 52bfd423_b702_638e_0981_174791c13ff8["__init__()"] a10e05b7_8a18_0e17_1c03_e7ac470fe677["AsyncRootListenersTracer"] 52bfd423_b702_638e_0981_174791c13ff8 -->|defined in| a10e05b7_8a18_0e17_1c03_e7ac470fe677 style 52bfd423_b702_638e_0981_174791c13ff8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/tracers/root_listeners.py lines 84–106
def __init__(
self,
*,
config: RunnableConfig,
on_start: AsyncListener | None,
on_end: AsyncListener | None,
on_error: AsyncListener | None,
) -> None:
"""Initialize the tracer.
Args:
config: The runnable config.
on_start: The listener to call on run start.
on_end: The listener to call on run end.
on_error: The listener to call on run error
"""
super().__init__(_schema_format="original+chat")
self.config = config
self._arg_on_start = on_start
self._arg_on_end = on_end
self._arg_on_error = on_error
self.root_id: UUID | None = None
Domain
Subdomains
Source
Frequently Asked Questions
What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/root_listeners.py.
Where is __init__() defined?
__init__() is defined in libs/core/langchain_core/tracers/root_listeners.py at line 84.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free