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

# WhatsApp 集成

> 使用 LangChain Python 与 WhatsApp 文档加载器集成。

> [WhatsApp](https://www.whatsapp.com/)（也称为 `WhatsApp Messenger`）是一款免费、跨平台、集中式的即时通讯（IM）和网络语音通话（VoIP）服务。它允许用户发送文本和语音消息、进行语音和视频通话，以及分享图片、文档、用户位置和其他内容。

本笔记本介绍如何从 `WhatsApp 聊天记录` 加载数据，并将其转换为可被 LangChain 处理的格式。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_community.document_loaders import WhatsAppChatLoader
```

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
loader = WhatsAppChatLoader("example_data/whatsapp_chat.txt")
```

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
loader.load()
```

***

<div className="source-links">
  <Callout icon="terminal-2">
    [连接这些文档](/use-these-docs) 到 Claude、VSCode 等，通过 MCP 获取实时答案。
  </Callout>

  <Callout icon="edit">
    [在 GitHub 上编辑此页面](https://github.com/langchain-ai/docs/edit/main/src/oss/python/integrations/document_loaders/whatsapp_chat.mdx) 或 [提交问题](https://github.com/langchain-ai/docs/issues/new/choose)。
  </Callout>
</div>
