ChatPerplexity 功能和配置的详细文档,请前往 API reference.
概述
集成详情
模型功能
设置
要访问 Perplexity 模型,您需要创建一个 Perplexity 账户,获取 API 密钥,并安装langchain-perplexity 集成包。
凭证
前往 this page 注册 Perplexity 并生成 API 密钥。 完成后设置PPLX_API_KEY 环境变量:
Using perplexity-specific parameters through ChatPerplexity
You can also use Perplexity-specific parameters through the ChatPerplexity class. For example, parameters like search_domain_filter, return_images, return_related_questions or search_recency_filter using the extra_body parameter as shown below:
Accessing the search results metadata
Perplexity often provides a list of the web pages it consulted (“search_results”). You don’t need to pass any special parameter—the list is placed inresponse.additional_kwargs["search_results"].
ChatPerplexity also supports streaming functionality
ChatPerplexity supports structured outputs for tier 3+ users
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

