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.2.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.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llama_index_readers_whatsapp-0.4.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_whatsapp-0.4.2.tar.gz
Algorithm Hash digest
SHA256 a7a4cb3818382eba92da449cb04a67a5a2189a0340a9178d3ff2bc8ecda6214d
MD5 aefb93ea3093b08645acdd0da72f4ac9
BLAKE2b-256 ea7fff479dd8f22f73221f83727f264199a1276993afc63a26f7cf24b50e5c1e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_index_readers_whatsapp-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_whatsapp-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa447233c4c92ebdb54c383f87b1ac1a2ccdc46766d7a414433197cd731de193
MD5 b1bf01639f70a96989cfd42b26290422
BLAKE2b-256 2f390c8731d76bedf7b0810f0e9ae1fc948a8b3fb1175240a8bb9cd70f3eb1fb

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