_validate_tools() — langchain Function Reference
Architecture documentation for the _validate_tools() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD aa43b201_85d4_3e68_b77d_271aa3784786["_validate_tools()"] d5d43d15_73de_819f_ef9d_0df3b0f5c681["ReActDocstoreAgent"] aa43b201_85d4_3e68_b77d_271aa3784786 -->|defined in| d5d43d15_73de_819f_ef9d_0df3b0f5c681 9bf9550d_96c7_784c_c127_4609af342ad6["_validate_tools()"] 9bf9550d_96c7_784c_c127_4609af342ad6 -->|calls| aa43b201_85d4_3e68_b77d_271aa3784786 9bf9550d_96c7_784c_c127_4609af342ad6["_validate_tools()"] aa43b201_85d4_3e68_b77d_271aa3784786 -->|calls| 9bf9550d_96c7_784c_c127_4609af342ad6 style aa43b201_85d4_3e68_b77d_271aa3784786 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/react/base.py lines 58–67
def _validate_tools(cls, tools: Sequence[BaseTool]) -> None:
validate_tools_single_input(cls.__name__, tools)
super()._validate_tools(tools)
if len(tools) != len(_LOOKUP_AND_SEARCH_TOOLS):
msg = f"Exactly two tools must be specified, but got {tools}"
raise ValueError(msg)
tool_names = {tool.name for tool in tools}
if tool_names != _LOOKUP_AND_SEARCH_TOOLS:
msg = f"Tool names should be Lookup and Search, got {tool_names}"
raise ValueError(msg)
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does _validate_tools() do?
_validate_tools() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/react/base.py.
Where is _validate_tools() defined?
_validate_tools() is defined in libs/langchain/langchain_classic/agents/react/base.py at line 58.
What does _validate_tools() call?
_validate_tools() calls 1 function(s): _validate_tools.
What calls _validate_tools()?
_validate_tools() is called by 1 function(s): _validate_tools.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free