Home / Function/ on_tool_error() — langchain Function Reference

on_tool_error() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  9ab10cd9_db1e_9146_283d_8ccd4942c62b["on_tool_error()"]
  64513429_d001_87b1_5f19_cc17a3f3577b["AsyncCallbackHandler"]
  9ab10cd9_db1e_9146_283d_8ccd4942c62b -->|defined in| 64513429_d001_87b1_5f19_cc17a3f3577b
  76fdfac8_ff2f_aaba_3924_597e7bfab872["on_tool_error()"]
  76fdfac8_ff2f_aaba_3924_597e7bfab872 -->|calls| 9ab10cd9_db1e_9146_283d_8ccd4942c62b
  76fdfac8_ff2f_aaba_3924_597e7bfab872["on_tool_error()"]
  9ab10cd9_db1e_9146_283d_8ccd4942c62b -->|calls| 76fdfac8_ff2f_aaba_3924_597e7bfab872
  style 9ab10cd9_db1e_9146_283d_8ccd4942c62b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 720–737

    async def on_tool_error(
        self,
        error: BaseException,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        tags: list[str] | None = None,
        **kwargs: Any,
    ) -> None:
        """Run when tool errors.

        Args:
            error: The error that occurred.
            run_id: The ID of the current run.
            parent_run_id: The ID of the parent run.
            tags: The tags.
            **kwargs: Additional keyword arguments.
        """

Domain

Subdomains

Called By

Frequently Asked Questions

What does on_tool_error() do?
on_tool_error() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is on_tool_error() defined?
on_tool_error() is defined in libs/core/langchain_core/callbacks/base.py at line 720.
What does on_tool_error() call?
on_tool_error() calls 1 function(s): on_tool_error.
What calls on_tool_error()?
on_tool_error() is called by 1 function(s): on_tool_error.

Analyze Your Own Codebase

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

Try Supermodel Free