on_tool_end() — langchain Function Reference
Architecture documentation for the on_tool_end() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 3c301f83_2f92_47da_cfb1_097c993f88fb["on_tool_end()"] 0f6b3261_31fa_c34e_ca33_cb141bdf78ff["BaseTracer"] 3c301f83_2f92_47da_cfb1_097c993f88fb -->|defined in| 0f6b3261_31fa_c34e_ca33_cb141bdf78ff 7bd5eb03_6d13_dcf0_56f3_cb5d1f0ce44d["on_tool_end()"] 7bd5eb03_6d13_dcf0_56f3_cb5d1f0ce44d -->|calls| 3c301f83_2f92_47da_cfb1_097c993f88fb 9191b24f_a202_df21_16c5_e2608083aef8["_end_trace()"] 3c301f83_2f92_47da_cfb1_097c993f88fb -->|calls| 9191b24f_a202_df21_16c5_e2608083aef8 389d2c9d_1f7b_6f21_5827_0f636aa0e114["_on_tool_end()"] 3c301f83_2f92_47da_cfb1_097c993f88fb -->|calls| 389d2c9d_1f7b_6f21_5827_0f636aa0e114 7bd5eb03_6d13_dcf0_56f3_cb5d1f0ce44d["on_tool_end()"] 3c301f83_2f92_47da_cfb1_097c993f88fb -->|calls| 7bd5eb03_6d13_dcf0_56f3_cb5d1f0ce44d style 3c301f83_2f92_47da_cfb1_097c993f88fb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/tracers/base.py lines 388–405
def on_tool_end(self, output: Any, *, run_id: UUID, **kwargs: Any) -> Run:
"""End a trace for a tool run.
Args:
output: The output for the tool.
run_id: The run ID.
**kwargs: Additional arguments.
Returns:
The run.
"""
tool_run = self._complete_tool_run(
output=output,
run_id=run_id,
)
self._end_trace(tool_run)
self._on_tool_end(tool_run)
return tool_run
Domain
Subdomains
Defined In
Called By
Source
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/base.py.
Where is on_tool_end() defined?
on_tool_end() is defined in libs/core/langchain_core/tracers/base.py at line 388.
What does on_tool_end() call?
on_tool_end() calls 3 function(s): _end_trace, _on_tool_end, on_tool_end.
What calls on_tool_end()?
on_tool_end() is called by 1 function(s): on_tool_end.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free