on_chain_start() — langchain Function Reference
Architecture documentation for the on_chain_start() function in file.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b49e271b_5ffb_4c0a_2546_acb41b8cc221["on_chain_start()"] 52737fd4_dd58_4289_8b70_0131f09b23a5["FileCallbackHandler"] b49e271b_5ffb_4c0a_2546_acb41b8cc221 -->|defined in| 52737fd4_dd58_4289_8b70_0131f09b23a5 efeb47b6_76c6_8f45_76b9_d26fbc90c538["_write()"] b49e271b_5ffb_4c0a_2546_acb41b8cc221 -->|calls| efeb47b6_76c6_8f45_76b9_d26fbc90c538 style b49e271b_5ffb_4c0a_2546_acb41b8cc221 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/callbacks/file.py lines 164–180
def on_chain_start(
self, serialized: dict[str, Any], inputs: dict[str, Any], **kwargs: Any
) -> None:
"""Print that we are entering a chain.
Args:
serialized: The serialized chain information.
inputs: The inputs to the chain.
**kwargs: Additional keyword arguments that may contain `'name'`.
"""
name = (
kwargs.get("name")
or serialized.get("name", serialized.get("id", ["<unknown>"])[-1])
or "<unknown>"
)
self._write(f"\n\n> Entering new {name} chain...", end="\n")
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does on_chain_start() do?
on_chain_start() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/file.py.
Where is on_chain_start() defined?
on_chain_start() is defined in libs/core/langchain_core/callbacks/file.py at line 164.
What does on_chain_start() call?
on_chain_start() calls 1 function(s): _write.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free