> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-zh.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Perplexity 集成

> 使用 LangChain Python 与 Perplexity 集成。

> [Perplexity](https://www.perplexity.ai/pro) 是搜索互联网最强大的方式，
> 提供无限量的 Pro Search、升级的 AI 模型、无限文件上传、
> 图像生成和 API 积分。
>
> 您可以查看 [可用模型列表](https://docs.perplexity.ai/docs/model-cards)。

## 安装与设置

安装 Perplexity x LangChain 集成包：

<CodeGroup>
  ```bash pip theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  pip install langchain-perplexity
  ```

  ```bash uv theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  uv add langchain-perplexity
  ```
</CodeGroup>

从 [Perplexity 入门指南](https://docs.perplexity.ai/docs/getting-started) 获取您的 API 密钥。

## 聊天模型

查看各种 [Perplexity 使用示例](/oss/python/integrations/chat/perplexity)。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_perplexity import ChatPerplexity
```

***

<div className="source-links">
  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/i18n\zh-CN\oss\python\integrations\providers\perplexity.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>

  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>
</div>
