概述
This will help you get started withPerplexitySearchRetriever retrieval. For detailed documentation of all PerplexitySearchRetriever features and configurations head to the API reference.
集成详情
设置
You will need to populate aPERPLEXITY_API_KEY environment variable with your Perplexity API key, or pass it into the constructor as apiKey. Get a key from the Perplexity API key dashboard.
安装
This retriever lives in the@langchain/perplexity package:
实例化
maxResults, country, searchDomainFilter, searchRecencyFilter, searchAfterDate, and searchBeforeDate. See the Perplexity Search API parameters for details.
用法
Document has the search result snippet as pageContent and { title, url, date, lastUpdated } in metadata.
Use within a chain
Like other retrievers,PerplexitySearchRetriever can be incorporated into LLM applications via chains.
API 参考
有关所有PerplexitySearchRetriever 功能和配置的详细文档,请前往 API 参考。
将这些文档连接到 Claude、VSCode 等工具,通过 MCP 获取实时答案。

