Home / Function/ on_llm_end() — langchain Function Reference

on_llm_end() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  bfcf2566_a20a_41fe_25c4_91010073fdeb["on_llm_end()"]
  a2d4d2d4_52ab_0e90_145b_14769a61a7d9["CallbackManagerForLLMRun"]
  bfcf2566_a20a_41fe_25c4_91010073fdeb -->|defined in| a2d4d2d4_52ab_0e90_145b_14769a61a7d9
  3dd7711b_7288_48d1_9e92_1b31506ed350["on_llm_end()"]
  3dd7711b_7288_48d1_9e92_1b31506ed350 -->|calls| bfcf2566_a20a_41fe_25c4_91010073fdeb
  3dd7711b_7288_48d1_9e92_1b31506ed350["on_llm_end()"]
  bfcf2566_a20a_41fe_25c4_91010073fdeb -->|calls| 3dd7711b_7288_48d1_9e92_1b31506ed350
  8964b4e9_440e_18a7_2a15_a54a0b2b733c["handle_event()"]
  bfcf2566_a20a_41fe_25c4_91010073fdeb -->|calls| 8964b4e9_440e_18a7_2a15_a54a0b2b733c
  style bfcf2566_a20a_41fe_25c4_91010073fdeb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/manager.py lines 704–723

    def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None:
        """Run when LLM ends running.

        Args:
            response: The LLM result.
            **kwargs: Additional keyword arguments.

        """
        if not self.handlers:
            return
        handle_event(
            self.handlers,
            "on_llm_end",
            "ignore_llm",
            response,
            run_id=self.run_id,
            parent_run_id=self.parent_run_id,
            tags=self.tags,
            **kwargs,
        )

Domain

Subdomains

Called By

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/callbacks/manager.py.
Where is on_llm_end() defined?
on_llm_end() is defined in libs/core/langchain_core/callbacks/manager.py at line 704.
What does on_llm_end() call?
on_llm_end() calls 2 function(s): handle_event, on_llm_end.
What calls on_llm_end()?
on_llm_end() is called by 1 function(s): on_llm_end.

Analyze Your Own Codebase

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

Try Supermodel Free