Home / Function/ on_chain_end() — langchain Function Reference

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
  90e4f83d_bcd8_a8fa_abde_76f469443983["on_chain_end()"]
  b12567d8_81a9_52c3_3096_d524d1371c83["CallbackManagerForChainGroup"]
  90e4f83d_bcd8_a8fa_abde_76f469443983 -->|defined in| b12567d8_81a9_52c3_3096_d524d1371c83
  3b7be403_b5f2_f25b_2714_6d61955e1332["on_chain_end()"]
  90e4f83d_bcd8_a8fa_abde_76f469443983 -->|calls| 3b7be403_b5f2_f25b_2714_6d61955e1332
  style 90e4f83d_bcd8_a8fa_abde_76f469443983 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/manager.py lines 1750–1759

    def on_chain_end(self, outputs: dict[str, Any] | Any, **kwargs: Any) -> None:
        """Run when traced chain group ends.

        Args:
            outputs: The outputs of the chain.
            **kwargs: Additional keyword arguments.

        """
        self.ended = True
        return self.parent_run_manager.on_chain_end(outputs, **kwargs)

Domain

Subdomains

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 1750.
What does on_chain_end() call?
on_chain_end() calls 1 function(s): on_chain_end.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free