Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WhatsAppChatLoader regex to handle multiple date-time formats #4186

Merged
merged 2 commits into from May 5, 2023

Conversation

hp0404
Copy link
Contributor

@hp0404 hp0404 commented May 5, 2023

This PR updates the message_line_regex used by WhatsAppChatLoader to support different date-time formats used in WhatsApp chat exports; resolves #4153.

The new regex handles the following input formats:

[05.05.23, 15:48:11] James: Hi here
[11/8/21, 9:41:32 AM] User name: Message 123
1/23/23, 3:19 AM - User 2: Bye!
1/23/23, 3:22_AM - User 1: And let me know if anything changes

Tests have been added to verify that the loader works correctly with all formats.

@dev2049
Copy link
Contributor

dev2049 commented May 5, 2023

looks great, thanks @hp0404!

@dev2049 dev2049 merged commit 2a3c5f8 into langchain-ai:master May 5, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WhatsAppChatLoader doesn't work on chats exported from WhatsApp
2 participants