Home / Function/ _on_llm_end() — langchain Function Reference

_on_llm_end() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  431be517_3f37_ea62_947a_c527994dac16["_on_llm_end()"]
  56d9fac7_db71_9c71_7cac_1d680d392fa0["FunctionCallbackHandler"]
  431be517_3f37_ea62_947a_c527994dac16 -->|defined in| 56d9fac7_db71_9c71_7cac_1d680d392fa0
  1bda6774_d332_dec5_ed8f_8d6eef57961e["get_breadcrumbs()"]
  431be517_3f37_ea62_947a_c527994dac16 -->|calls| 1bda6774_d332_dec5_ed8f_8d6eef57961e
  78a56963_548a_2192_487f_472b05419cba["elapsed()"]
  431be517_3f37_ea62_947a_c527994dac16 -->|calls| 78a56963_548a_2192_487f_472b05419cba
  95875f96_0c2d_b364_e63a_651f8ed4cdcd["try_json_stringify()"]
  431be517_3f37_ea62_947a_c527994dac16 -->|calls| 95875f96_0c2d_b364_e63a_651f8ed4cdcd
  style 431be517_3f37_ea62_947a_c527994dac16 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tracers/stdout.py lines 149–157

    def _on_llm_end(self, run: Run) -> None:
        crumbs = self.get_breadcrumbs(run)
        self.function_callback(
            f"{get_colored_text('[llm/end]', color='blue')} "
            + get_bolded_text(
                f"[{crumbs}] [{elapsed(run)}] Exiting LLM run with output:\n"
            )
            + f"{try_json_stringify(run.outputs, '[response]')}"
        )

Domain

Subdomains

Frequently Asked Questions

What does _on_llm_end() do?
_on_llm_end() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/stdout.py.
Where is _on_llm_end() defined?
_on_llm_end() is defined in libs/core/langchain_core/tracers/stdout.py at line 149.
What does _on_llm_end() call?
_on_llm_end() calls 3 function(s): elapsed, get_breadcrumbs, try_json_stringify.

Analyze Your Own Codebase

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

Try Supermodel Free