Home / Function/ _on_llm_start() — langchain Function Reference

_on_llm_start() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  47ffbd38_6b27_99ae_6f16_a6e3b801394b["_on_llm_start()"]
  178590bb_85ff_b79e_979a_46e5c3c5389f["LangChainTracer"]
  47ffbd38_6b27_99ae_6f16_a6e3b801394b -->|defined in| 178590bb_85ff_b79e_979a_46e5c3c5389f
  cf43defe_cb35_deb4_9782_55f973cdf6ca["_persist_run_single()"]
  47ffbd38_6b27_99ae_6f16_a6e3b801394b -->|calls| cf43defe_cb35_deb4_9782_55f973cdf6ca
  style 47ffbd38_6b27_99ae_6f16_a6e3b801394b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tracers/langchain.py lines 269–273

    def _on_llm_start(self, run: Run) -> None:
        """Persist an LLM run."""
        if run.parent_run_id is None:
            run.reference_example_id = self.example_id
        self._persist_run_single(run)

Domain

Subdomains

Frequently Asked Questions

What does _on_llm_start() do?
_on_llm_start() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/langchain.py.
Where is _on_llm_start() defined?
_on_llm_start() is defined in libs/core/langchain_core/tracers/langchain.py at line 269.
What does _on_llm_start() call?
_on_llm_start() calls 1 function(s): _persist_run_single.

Analyze Your Own Codebase

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

Try Supermodel Free