llama-index readers whatsapp integration
Project description
Whatsapp chat loader
pip install llama-index-readers-whatsapp
Export a Whatsapp chat
- Open a chat
- Tap on the menu > More > Export chat
- Select Without media
- Save the
.txtfile in your working directory
For more info see Whatsapp's Help Center
Usage
- Messages will get saved in the format:
{timestamp} {author}: {message}. Useful for when you want to ask about specific people in a group chat. - Metadata automatically included:
source(file name),authorandtimestamp.
from pathlib import Path
from llama_index.readers.whatsapp import WhatsappChatLoader
path = "whatsapp.txt"
loader = WhatsappChatLoader(path=path)
documents = loader.load_data()
# see what's created
documents[0]
# >>> Document(text='2023-02-20 00:00:00 ur mom: Hi 😊', doc_id='e0a7c508-4ba0-48e1-a2ba-9af133225636', embedding=None, extra_info={'source': 'WhatsApp Chat with ur mom', 'author': 'ur mom', 'date': '2023-02-20 00:00:00'})
This loader is designed to be used as a way to load data into LlamaIndex.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_readers_whatsapp-0.4.0.tar.gz.
File metadata
- Download URL: llama_index_readers_whatsapp-0.4.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9131fe4788681bd271edab52a57f29f31c60468d75b7aa75bb164d9e46fe0a22
|
|
| MD5 |
bec497d9725f4c018787718417cd669c
|
|
| BLAKE2b-256 |
834ba277893d33ecdd1ea8f364646057f569b9f6b289b808898f34dcc02a475b
|
File details
Details for the file llama_index_readers_whatsapp-0.4.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_readers_whatsapp-0.4.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0895e38e0ef13c075e19e209920476727e1d22975579d190d309f6243cd89042
|
|
| MD5 |
410b5e80b59fb1d9bb7f0eb4303bf3e6
|
|
| BLAKE2b-256 |
09dff43d953293743cf47a47cd451a8086bf15cc6e3c6657fe62e4249e48d37a
|