Linkup
Linkup provides an API to connect LLMs to the web and the Linkup Premium Partner sources.
安装与设置
要使用Linkup提供程序,您首先需要一个有效的API密钥,您可以通过注册这里找到。
您还需要langchain-linkup包,可以使用pip安装:
pip install langchain-linkup
检索器
查看一个 使用示例。
from langchain_linkup import LinkupSearchRetriever
retriever = LinkupSearchRetriever(
depth="deep", # "standard" or "deep"
linkup_api_key=None, # API key can be passed here or set as the LINKUP_API_KEY environment variable
)
工具
查看一个 使用示例。
from langchain_linkup import LinkupSearchTool
tool = LinkupSearchTool(
depth="deep", # "standard" or "deep"
output_type="searchResults", # "searchResults", "sourcedAnswer" or "structured"
linkup_api_key=None, # API key can be passed here or set as the LINKUP_API_KEY environment variable
)