on_chain_end() — langchain Function Reference
Architecture documentation for the on_chain_end() function in manager.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 3b7be403_b5f2_f25b_2714_6d61955e1332["on_chain_end()"] 81cd9db4_6745_5fd9_98e7_4b450c8fee53["CallbackManagerForChainRun"] 3b7be403_b5f2_f25b_2714_6d61955e1332 -->|defined in| 81cd9db4_6745_5fd9_98e7_4b450c8fee53 093c841a_166d_5740_b357_6299063e562a["on_chain_end()"] 093c841a_166d_5740_b357_6299063e562a -->|calls| 3b7be403_b5f2_f25b_2714_6d61955e1332 90e4f83d_bcd8_a8fa_abde_76f469443983["on_chain_end()"] 90e4f83d_bcd8_a8fa_abde_76f469443983 -->|calls| 3b7be403_b5f2_f25b_2714_6d61955e1332 e694e06d_9c3a_9620_74b6_743814a492ce["trace_as_chain_group()"] e694e06d_9c3a_9620_74b6_743814a492ce -->|calls| 3b7be403_b5f2_f25b_2714_6d61955e1332 57f655ed_89b3_c486_de7e_73ebe360134a["atrace_as_chain_group()"] 57f655ed_89b3_c486_de7e_73ebe360134a -->|calls| 3b7be403_b5f2_f25b_2714_6d61955e1332 8964b4e9_440e_18a7_2a15_a54a0b2b733c["handle_event()"] 3b7be403_b5f2_f25b_2714_6d61955e1332 -->|calls| 8964b4e9_440e_18a7_2a15_a54a0b2b733c 093c841a_166d_5740_b357_6299063e562a["on_chain_end()"] 3b7be403_b5f2_f25b_2714_6d61955e1332 -->|calls| 093c841a_166d_5740_b357_6299063e562a style 3b7be403_b5f2_f25b_2714_6d61955e1332 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/callbacks/manager.py lines 858–877
def on_chain_end(self, outputs: dict[str, Any] | Any, **kwargs: Any) -> None:
"""Run when chain ends running.
Args:
outputs: The outputs of the chain.
**kwargs: Additional keyword arguments.
"""
if not self.handlers:
return
handle_event(
self.handlers,
"on_chain_end",
"ignore_chain",
outputs,
run_id=self.run_id,
parent_run_id=self.parent_run_id,
tags=self.tags,
**kwargs,
)
Domain
Subdomains
Source
Frequently Asked Questions
What does on_chain_end() do?
on_chain_end() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/manager.py.
Where is on_chain_end() defined?
on_chain_end() is defined in libs/core/langchain_core/callbacks/manager.py at line 858.
What does on_chain_end() call?
on_chain_end() calls 2 function(s): handle_event, on_chain_end.
What calls on_chain_end()?
on_chain_end() is called by 4 function(s): atrace_as_chain_group, on_chain_end, on_chain_end, trace_as_chain_group.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free