Home / Function/ on_chain_start() — langchain Function Reference

on_chain_start() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  820b7c03_0358_cf7b_0c26_fbe4d32ae8b0["on_chain_start()"]
  64513429_d001_87b1_5f19_cc17a3f3577b["AsyncCallbackHandler"]
  820b7c03_0358_cf7b_0c26_fbe4d32ae8b0 -->|defined in| 64513429_d001_87b1_5f19_cc17a3f3577b
  9a94c7d5_5b57_d6be_f7fc_8502cdb2943c["on_chain_start()"]
  9a94c7d5_5b57_d6be_f7fc_8502cdb2943c -->|calls| 820b7c03_0358_cf7b_0c26_fbe4d32ae8b0
  9a94c7d5_5b57_d6be_f7fc_8502cdb2943c["on_chain_start()"]
  820b7c03_0358_cf7b_0c26_fbe4d32ae8b0 -->|calls| 9a94c7d5_5b57_d6be_f7fc_8502cdb2943c
  style 820b7c03_0358_cf7b_0c26_fbe4d32ae8b0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 615–636

    async def on_chain_start(
        self,
        serialized: dict[str, Any],
        inputs: dict[str, Any],
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        tags: list[str] | None = None,
        metadata: dict[str, Any] | None = None,
        **kwargs: Any,
    ) -> None:
        """Run when a chain starts running.

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

Domain

Subdomains

Called By

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

Analyze Your Own Codebase

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

Try Supermodel Free