Skip to main content

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

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])

Metadata

Release files for chatlogger-db 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chatlogger-db 0.1.6
File Size Uploaded Provenance Actions
chatlogger-db-0.1.6.tar.gz 4.4 kB Without provenance Details for chatlogger-db-0.1.6.tar.gz

Release files / chatlogger-db-0.1.6.tar.gz

Download URL chatlogger-db-0.1.6.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a7ef0a039915f3e6ed35ecd6843771531ddb9f81dd12836d19ac2dcabeef8552
BLAKE2b-256 checksum
How to use checksums
6b369dd89e8e53cf1248a81b01c333e9a3942664356e17a12b8b7435adfb24e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Security for chatlogger-db 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page