Home / Function/ on_chain_end() — langchain Function Reference

on_chain_end() — langchain Function Reference

Architecture documentation for the on_chain_end() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  dd773e89_d395_3391_673f_8801efb1e38e["on_chain_end()"]
  64513429_d001_87b1_5f19_cc17a3f3577b["AsyncCallbackHandler"]
  dd773e89_d395_3391_673f_8801efb1e38e -->|defined in| 64513429_d001_87b1_5f19_cc17a3f3577b
  2d9b666e_e806_6c6b_7c2e_430e494f9f65["on_chain_end()"]
  2d9b666e_e806_6c6b_7c2e_430e494f9f65 -->|calls| dd773e89_d395_3391_673f_8801efb1e38e
  2d9b666e_e806_6c6b_7c2e_430e494f9f65["on_chain_end()"]
  dd773e89_d395_3391_673f_8801efb1e38e -->|calls| 2d9b666e_e806_6c6b_7c2e_430e494f9f65
  style dd773e89_d395_3391_673f_8801efb1e38e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 638–655

    async def on_chain_end(
        self,
        outputs: dict[str, Any],
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        tags: list[str] | None = None,
        **kwargs: Any,
    ) -> None:
        """Run when a chain ends running.

        Args:
            outputs: The outputs of the chain.
            run_id: The ID of the current run.
            parent_run_id: The ID of the parent run.
            tags: The tags.
            **kwargs: Additional keyword arguments.
        """

Domain

Subdomains

Called By

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/base.py.
Where is on_chain_end() defined?
on_chain_end() is defined in libs/core/langchain_core/callbacks/base.py at line 638.
What does on_chain_end() call?
on_chain_end() calls 1 function(s): on_chain_end.
What calls on_chain_end()?
on_chain_end() is called by 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