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
.txt
file 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),author
andtimestamp
.
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
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
File details
Details for the file llama_index_readers_whatsapp-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_readers_whatsapp-0.3.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c6c94ddadebaa8ed4ffdb584fd1f2410b9b0aaf7b8d6720d73e9e1ba6d29524 |
|
MD5 | 060852c98b867e355b42238dd90fd021 |
|
BLAKE2b-256 | 3547aac4a9be58805f7211e291b9dbf6d0c6a2ee3cd1c501a2c5d2669cacaa82 |
File details
Details for the file llama_index_readers_whatsapp-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_readers_whatsapp-0.3.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 406a1aaf83d5761c8043655893911fc0b3721358db48cdf9cfd9b116bf6dbb1a |
|
MD5 | 78bd14498ab2602ecb1e37eabf2cff33 |
|
BLAKE2b-256 | 2edf1990ae072c587d379a209c95cd0a1a9d899f79788804298fa4d92ea02863 |