Skip to main content
Tavily’s Search API is a search engine built specifically for AI agents (LLMs), delivering real-time, accurate, and factual results at speed.

概述

This will help you getting started with TavilySearchAPIRetriever retrieval. For detailed documentation of all TavilySearchAPIRetriever features and configurations head to the API reference.

集成详情

设置

You will need to populate a TAVILY_API_KEY environment variable with your Tavily API key or pass it into the constructor as apiKey. Obtain a key by signing up on their website. If you want to get automated tracing from individual queries, you can also set your LangSmith API key by uncommenting below:

安装

This retriever lives in the @langchain/community package:

实例化

Now we can instantiate our retriever:
For a full list of allowed arguments, see the official documentation. You can pass any param to the SDK via a kwargs object.

用法


API 参考

有关所有 TavilySearchAPIRetriever 功能和配置的详细文档,请前往 API 参考