You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched existing ideas and did not find a similar one
I added a very descriptive title
I've clearly described the feature request and motivation for it
Feature request
Add a WhatsApp Chat Loader to LangChain.js, matching the functionality available in LangChain Python.
Motivation
WhatsApp is one of the most widely used messaging platforms globally (2B+ users), and chat export is a common use case for conversational AI and RAG applications. The Python implementation exists but the JS/TS version doesn't, creating a gap for developers who need this functionality.
Why this matters:
Feature parity with Python implementation - ensures consistency across the LangChain ecosystem
High demand - WhatsApp chat analysis is a frequent use case for conversation history, customer support analysis, and knowledge extraction
Simple implementation - Text file parsing only, no external API dependencies or authentication required
Low maintenance burden - Standard .txt export format with well-defined structure
Important discovery: This is actually a Chat Loader, not a Document Loader. It returns ChatSession objects with HumanMessage instances, preserving the conversational structure.
Input: Exported WhatsApp chat files (.txt format, without media)
Output:ChatSession with HumanMessage objects containing sender and timestamp metadata
Features:
Multi-line message support
System message filtering (deleted messages, media omitted, etc.)
Timestamp and sender extraction
Support for both 12-hour (AM/PM) and 24-hour formats
Dependencies: None (pure text parsing with regex)
Tests: Integration tests with sample chat exports
Example usage:
import{WhatsAppChatLoader}from"@langchain/community/chat_loaders/whatsapp";constloader=newWhatsAppChatLoader("path/to/chat.txt");constchatSessions=awaitloader.load();// Returns ChatSession with HumanMessage objects
Question: Given the simplicity of this loader and low maintenance requirements, would it be acceptable to contribute this directly to @langchain/community, or should this be published as a standalone NPM package per the current integration guidelines? I'm ready to implement this with full tests and documentation if this is welcome in the main repository.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
Add a WhatsApp Chat Loader to LangChain.js, matching the functionality available in LangChain Python.
Motivation
WhatsApp is one of the most widely used messaging platforms globally (2B+ users), and chat export is a common use case for conversational AI and RAG applications. The Python implementation exists but the JS/TS version doesn't, creating a gap for developers who need this functionality.
Why this matters:
Reference:
Proposal (If applicable)
Important discovery: This is actually a Chat Loader, not a Document Loader. It returns
ChatSessionobjects withHumanMessageinstances, preserving the conversational structure.Implementation approach:
libs/langchain-community/src/chat_loaders/whatsapp.ts@langchain/community/chat_loaders/whatsappChatSessionwithHumanMessageobjects containing sender and timestamp metadataExample usage:
Question: Given the simplicity of this loader and low maintenance requirements, would it be acceptable to contribute this directly to @langchain/community, or should this be published as a standalone NPM package per the current integration guidelines? I'm ready to implement this with full tests and documentation if this is welcome in the main repository.
Beta Was this translation helpful? Give feedback.
All reactions