Skip to main content

llama-index readers whatsapp integration

Project description

Whatsapp chat loader

pip install llama-index-readers-whatsapp

Export a Whatsapp chat

  1. Open a chat
  2. Tap on the menu > More > Export chat
  3. Select Without media
  4. 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 and timestamp.
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

llama_index_readers_whatsapp-0.4.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_whatsapp-0.4.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_whatsapp-0.4.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_whatsapp-0.4.1.tar.gz
Algorithm Hash digest
SHA256 58fe1d7e2c049f2fc0924211ff2a706393b03f444711829cfda6f02586012767
MD5 984b8773eee363b9f1464455d5c2fb2a
BLAKE2b-256 8b0dc85690a90ac9837602dddec054044b3c3bb3ab0c965cd6b08d2ac63b2c25

See more details on using hashes here.

File details

Details for the file llama_index_readers_whatsapp-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_whatsapp-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbbf41d5130e10fe3b965ac86866e9beeb36d69323f35b15d70dc73f4d2258de
MD5 9661bfa6d172e618c74847e5d938b349
BLAKE2b-256 007afe79283938cfb2b3a90e2a24b42cb6b334d5067be4586deb1fcc1af0c297

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page