llama-index-readers-whatsapp


Namellama-index-readers-whatsapp JSON
Version 0.1.4 PyPI version JSON
download
home_page
Summaryllama-index readers whatsapp integration
upload_time2024-02-21 21:31:31
maintainerbatmanscode
docs_urlNone
authorYour Name
requires_python>=3.9,<4.0
licenseMIT
keywords chat whatsapp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Whatsapp chat loader

## 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](https://faq.whatsapp.com/1180414079177245/)

## 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`.

```python
from pathlib import Path
from llama_index import download_loader

WhatsappChatLoader = download_loader("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](https://github.com/run-llama/llama_index/tree/main/llama_index) and/or subsequently used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "llama-index-readers-whatsapp",
    "maintainer": "batmanscode",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "chat,whatsapp",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/5e/63/a696acdad424bf2162438e535289353a8ca8951e6e939893ba36f30ed321/llama_index_readers_whatsapp-0.1.4.tar.gz",
    "platform": null,
    "description": "# Whatsapp chat loader\n\n## Export a Whatsapp chat\n\n1. Open a chat\n2. Tap on the menu > More > Export chat\n3. Select **Without media**\n4. Save the `.txt` file in your working directory\n\nFor more info see [Whatsapp's Help Center](https://faq.whatsapp.com/1180414079177245/)\n\n## Usage\n\n- Messages will get saved in the format: `{timestamp} {author}: {message}`. Useful for when you want to ask about specific people in a group chat.\n- Metadata automatically included: `source` (file name), `author` and `timestamp`.\n\n```python\nfrom pathlib import Path\nfrom llama_index import download_loader\n\nWhatsappChatLoader = download_loader(\"WhatsappChatLoader\")\n\npath = \"whatsapp.txt\"\nloader = WhatsappChatLoader(path=path)\ndocuments = loader.load_data()\n\n# see what's created\ndocuments[0]\n# >>> Document(text='2023-02-20 00:00:00 ur mom: Hi \ud83d\ude0a', 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'})\n```\n\nThis loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index) and/or subsequently used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index readers whatsapp integration",
    "version": "0.1.4",
    "project_urls": null,
    "split_keywords": [
        "chat",
        "whatsapp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ae158f859960737004c93f7fb9ed8b4f860386b611a85d8dd1b0daeb442dcaf",
                "md5": "8251a77e5c2d35fdbd929130ee467c62",
                "sha256": "6f3d46ee6769c550b219d31fa502c6673b3ab85b87bcc43d66d64b386bc6fcd7"
            },
            "downloads": -1,
            "filename": "llama_index_readers_whatsapp-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8251a77e5c2d35fdbd929130ee467c62",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 2953,
            "upload_time": "2024-02-21T21:31:30",
            "upload_time_iso_8601": "2024-02-21T21:31:30.162128Z",
            "url": "https://files.pythonhosted.org/packages/0a/e1/58f859960737004c93f7fb9ed8b4f860386b611a85d8dd1b0daeb442dcaf/llama_index_readers_whatsapp-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e63a696acdad424bf2162438e535289353a8ca8951e6e939893ba36f30ed321",
                "md5": "13a51b72a140fb6111068266258f9529",
                "sha256": "8cc69d16ac32af53516c21973bb8d22c8b8b7f155c5209601921afd52284668e"
            },
            "downloads": -1,
            "filename": "llama_index_readers_whatsapp-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "13a51b72a140fb6111068266258f9529",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 2738,
            "upload_time": "2024-02-21T21:31:31",
            "upload_time_iso_8601": "2024-02-21T21:31:31.159867Z",
            "url": "https://files.pythonhosted.org/packages/5e/63/a696acdad424bf2162438e535289353a8ca8951e6e939893ba36f30ed321/llama_index_readers_whatsapp-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-21 21:31:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-readers-whatsapp"
}
        
Elapsed time: 0.18858s