Home / Function/ _on_tool_end() — langchain Function Reference

_on_tool_end() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  2ef5d58a_7e99_0446_20d8_b2a7f5e0e437["_on_tool_end()"]
  56d9fac7_db71_9c71_7cac_1d680d392fa0["FunctionCallbackHandler"]
  2ef5d58a_7e99_0446_20d8_b2a7f5e0e437 -->|defined in| 56d9fac7_db71_9c71_7cac_1d680d392fa0
  1bda6774_d332_dec5_ed8f_8d6eef57961e["get_breadcrumbs()"]
  2ef5d58a_7e99_0446_20d8_b2a7f5e0e437 -->|calls| 1bda6774_d332_dec5_ed8f_8d6eef57961e
  78a56963_548a_2192_487f_472b05419cba["elapsed()"]
  2ef5d58a_7e99_0446_20d8_b2a7f5e0e437 -->|calls| 78a56963_548a_2192_487f_472b05419cba
  style 2ef5d58a_7e99_0446_20d8_b2a7f5e0e437 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tracers/stdout.py lines 177–186

    def _on_tool_end(self, run: Run) -> None:
        crumbs = self.get_breadcrumbs(run)
        if run.outputs:
            self.function_callback(
                f"{get_colored_text('[tool/end]', color='blue')} "
                + get_bolded_text(
                    f"[{crumbs}] [{elapsed(run)}] Exiting Tool run with output:\n"
                )
                + f'"{str(run.outputs["output"]).strip()}"'
            )

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free