_run() — langchain Function Reference
Architecture documentation for the _run() function in tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 81bd1f24_1f9c_4cb6_2375_b9af5a8ac743["_run()"] d1e8793e_5d15_3b9c_4b0e_5c32c9855886["InvalidTool"] 81bd1f24_1f9c_4cb6_2375_b9af5a8ac743 -->|defined in| d1e8793e_5d15_3b9c_4b0e_5c32c9855886 style 81bd1f24_1f9c_4cb6_2375_b9af5a8ac743 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/tools.py lines 20–31
def _run(
self,
requested_tool_name: str,
available_tool_names: list[str],
run_manager: CallbackManagerForToolRun | None = None,
) -> str:
"""Use the tool."""
available_tool_names_str = ", ".join(list(available_tool_names))
return (
f"{requested_tool_name} is not a valid tool, "
f"try one of [{available_tool_names_str}]."
)
Domain
Subdomains
Source
Frequently Asked Questions
What does _run() do?
_run() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/tools.py.
Where is _run() defined?
_run() is defined in libs/langchain/langchain_classic/agents/tools.py at line 20.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free