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
  0ec97e35_d84b_5aa1_c268_3e092ab40e57["get_tools()"]
  23c1d7a4_768f_2f88_a9f7_e7cef9b792a4["VectorStoreToolkit"]
  0ec97e35_d84b_5aa1_c268_3e092ab40e57 -->|defined in| 23c1d7a4_768f_2f88_a9f7_e7cef9b792a4
  328e00ee_2559_abc7_c1f8_feaea9edadf0["get_tools()"]
  328e00ee_2559_abc7_c1f8_feaea9edadf0 -->|calls| 0ec97e35_d84b_5aa1_c268_3e092ab40e57
  328e00ee_2559_abc7_c1f8_feaea9edadf0["get_tools()"]
  0ec97e35_d84b_5aa1_c268_3e092ab40e57 -->|calls| 328e00ee_2559_abc7_c1f8_feaea9edadf0
  style 0ec97e35_d84b_5aa1_c268_3e092ab40e57 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/agents/agent_toolkits/vectorstore/toolkit.py lines 32–62

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

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 32.
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