Home / Function/ get_tools() — langchain Function Reference

get_tools() — langchain Function Reference

Architecture documentation for the get_tools() function in toolkit.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  d6940010_2f22_65fa_e255_49963fc9d76f["get_tools()"]
  c963a8d6_7ab0_1f50_acb0_47fe3ceb1a68["VectorStoreRouterToolkit"]
  d6940010_2f22_65fa_e255_49963fc9d76f -->|defined in| c963a8d6_7ab0_1f50_acb0_47fe3ceb1a68
  217e3ad7_1719_df7e_8610_b38b6d349c5b["get_tools()"]
  217e3ad7_1719_df7e_8610_b38b6d349c5b -->|calls| d6940010_2f22_65fa_e255_49963fc9d76f
  217e3ad7_1719_df7e_8610_b38b6d349c5b["get_tools()"]
  d6940010_2f22_65fa_e255_49963fc9d76f -->|calls| 217e3ad7_1719_df7e_8610_b38b6d349c5b
  style d6940010_2f22_65fa_e255_49963fc9d76f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/agents/agent_toolkits/vectorstore/toolkit.py lines 75–97

    def get_tools(self) -> list[BaseTool]:
        """Get the tools in the toolkit."""
        tools: list[BaseTool] = []
        try:
            from langchain_community.tools.vectorstore.tool import (
                VectorStoreQATool,
            )
        except ImportError as e:
            msg = "You need to install langchain-community to use this toolkit."
            raise ImportError(msg) from e
        for vectorstore_info in self.vectorstores:
            description = VectorStoreQATool.get_description(
                vectorstore_info.name,
                vectorstore_info.description,
            )
            qa_tool = VectorStoreQATool(
                name=vectorstore_info.name,
                description=description,
                vectorstore=vectorstore_info.vectorstore,
                llm=self.llm,
            )
            tools.append(qa_tool)
        return tools

Subdomains

Calls

Called By

Frequently Asked Questions

What does get_tools() do?
get_tools() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent_toolkits/vectorstore/toolkit.py.
Where is get_tools() defined?
get_tools() is defined in libs/langchain/langchain_classic/agents/agent_toolkits/vectorstore/toolkit.py at line 75.
What does get_tools() call?
get_tools() calls 1 function(s): get_tools.
What calls get_tools()?
get_tools() is called by 1 function(s): get_tools.

Analyze Your Own Codebase

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

Try Supermodel Free