langchain.agents.agent_toolkits.conversational_retrieval.tool.create_retriever_tool¶
langchain.agents.agent_toolkits.conversational_retrieval.tool.create_retriever_tool(retriever: BaseRetriever, name: str, description: str) → Tool[source]¶
Create a tool to do retrieval of documents.
Parameters
retriever – The retriever to use for the retrieval
name – The name for the tool. This will be passed to the language model,
so should be unique and somewhat descriptive.
description – The description for the tool. This will be passed to the language
model, so should be descriptive.
Returns
Tool class to pass to an agent
Examples using create_retriever_tool¶
Xata chat memory
Conversational Retrieval Agent
Set env var OPENAI_API_KEY or load from a .env file
SQL