chatlogger-db


Namechatlogger-db JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/thefcraft/chatlogger
SummaryThis is a simple Tree based database to store chats logs for a large language model. to save ollama or any other llm app chat history
upload_time2024-07-13 13:20:49
maintainerNone
docs_urlNone
authorThefCraft
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # chatlogger

chatlogger is a simple Tree based database to store chats logs for a large language model. to save ollama or any other llm app chat history

Install Using
`pip install chatlogger-db`


DEMO
```python
from chatlogger-db import DataBase, Message, Chat, RESPONSE, PROMPT
if __name__ == '__main__':
    db = DataBase()
    # db.load(r"dataset.bin")
    # db.save(r"main.bin")
    # print(db)
    # chat = db[2]
    idx = db.new_chat()
    chat = db[idx]
    print(chat)
    chat.new_message("Hello", "World!")
    chat.regenerate_last("hey")
    chat.edit_last("ss", "you!")
    chat.edit_last("i", "you!")
    chat.new_message("Hello", "World!")
    chat.new_message("Hello", "World!")
    chat.edit_last("i", "you!")
    chat.prev_prompt_last()
    chat.regenerate_last("hey2")
    chat.next_prompt_last()
    chat.prev_prompt_last()
    chat.edit(3, "asd", "res")
    chat.regenerate(2, "res2")
    chat.modify(2, "ajasd")
    chat.regenerate(2, "res2")
    chat.prev(2)
    chat.prev(2)
    chat.prev(1)
    chat.set_next_idx(0, 2)
    print(repr(chat))
    print(chat.curr_neighbours(1))
    print(chat.__len__())
    print(chat[0])
    print(chat[1])
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thefcraft/chatlogger",
    "name": "chatlogger-db",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "ThefCraft",
    "author_email": "sisodiyalaksh@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6b/36/9dd89e8e53cf1248a81b01c333e9a3942664356e17a12b8b7435adfb24e8/chatlogger-db-0.1.6.tar.gz",
    "platform": null,
    "description": "# chatlogger\n\nchatlogger is a simple Tree based database to store chats logs for a large language model. to save ollama or any other llm app chat history\n\nInstall Using\n`pip install chatlogger-db`\n\n\nDEMO\n```python\nfrom chatlogger-db import DataBase, Message, Chat, RESPONSE, PROMPT\nif __name__ == '__main__':\n    db = DataBase()\n    # db.load(r\"dataset.bin\")\n    # db.save(r\"main.bin\")\n    # print(db)\n    # chat = db[2]\n    idx = db.new_chat()\n    chat = db[idx]\n    print(chat)\n    chat.new_message(\"Hello\", \"World!\")\n    chat.regenerate_last(\"hey\")\n    chat.edit_last(\"ss\", \"you!\")\n    chat.edit_last(\"i\", \"you!\")\n    chat.new_message(\"Hello\", \"World!\")\n    chat.new_message(\"Hello\", \"World!\")\n    chat.edit_last(\"i\", \"you!\")\n    chat.prev_prompt_last()\n    chat.regenerate_last(\"hey2\")\n    chat.next_prompt_last()\n    chat.prev_prompt_last()\n    chat.edit(3, \"asd\", \"res\")\n    chat.regenerate(2, \"res2\")\n    chat.modify(2, \"ajasd\")\n    chat.regenerate(2, \"res2\")\n    chat.prev(2)\n    chat.prev(2)\n    chat.prev(1)\n    chat.set_next_idx(0, 2)\n    print(repr(chat))\n    print(chat.curr_neighbours(1))\n    print(chat.__len__())\n    print(chat[0])\n    print(chat[1])\n```\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "This is a simple Tree based database to store chats logs for a large language model. to save ollama or any other llm app chat history",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/thefcraft/chatlogger"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b369dd89e8e53cf1248a81b01c333e9a3942664356e17a12b8b7435adfb24e8",
                "md5": "e4317512d9a0546a49a9d5e24d5dbf5a",
                "sha256": "a7ef0a039915f3e6ed35ecd6843771531ddb9f81dd12836d19ac2dcabeef8552"
            },
            "downloads": -1,
            "filename": "chatlogger-db-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "e4317512d9a0546a49a9d5e24d5dbf5a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4423,
            "upload_time": "2024-07-13T13:20:49",
            "upload_time_iso_8601": "2024-07-13T13:20:49.490964Z",
            "url": "https://files.pythonhosted.org/packages/6b/36/9dd89e8e53cf1248a81b01c333e9a3942664356e17a12b8b7435adfb24e8/chatlogger-db-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-13 13:20:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thefcraft",
    "github_project": "chatlogger",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "chatlogger-db"
}
        
Elapsed time: 1.20725s