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
  5b3f5fc0_dfdb_49a5_405b_50c149699640["on_chain_end()"]
  c39f1e6c_ff8b_15f7_1623_83b1b6b328ac["AsyncCallbackManagerForChainGroup"]
  5b3f5fc0_dfdb_49a5_405b_50c149699640 -->|defined in| c39f1e6c_ff8b_15f7_1623_83b1b6b328ac
  093c841a_166d_5740_b357_6299063e562a["on_chain_end()"]
  5b3f5fc0_dfdb_49a5_405b_50c149699640 -->|calls| 093c841a_166d_5740_b357_6299063e562a
  style 5b3f5fc0_dfdb_49a5_405b_50c149699640 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/manager.py lines 2271–2279

    async 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
        await 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 2271.
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