Skip to main content

A pretty command line interface for LLM chat.

Project description

Aan easy-to-use, pretty, command-line chat interface for AWS Bedrock with simple animations, text styling, and

PyPI License Used on chat.alexbasile.com

Installation

Install it from PyPI using your favorite package manager:

pip install chatline

Config

Embedded Stream:

The most basic config simply passes a system and user message to the embedded stream, using your pre-configured AWS defaults:

from chatline import Interface

def main():
    # Initialize the interface in embedded mode (no endpoint)
    chat = Interface()
    
    # Start the conversation with default messages
    chat.start()

if __name__ == "__main__":
    main()

While some additional args can configure an introductory panel and logging:

from chatline import Interface

def main():
    # Initialize the interface in embedded mode with logging enabled
    chat = Interface(
        logging_enabled=True,
        log_file="logs/chatline_debug.log"
    )
    
    # Add a welcome message
    chat.preface("Welcome to ChatLine", title="Baze, Inc.", border_color="dim yellow")
    
    # Start the conversation with default messages
    chat.start()

if __name__ == "__main__":
    main()

Remote Stream:

Alternatively, you can use chatline in your server and

Controls

Return to 'Send' (send the current message) Crt + R to 'Retry' (generate a new response to the previous message) Crtl + E to 'Edit' (edit the previous message before sending it again)

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

chatline-0.0.4.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

chatline-0.0.4-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file chatline-0.0.4.tar.gz.

File metadata

  • Download URL: chatline-0.0.4.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/24.3.0

File hashes

Hashes for chatline-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ef2145d1074404a5b08223e593eae7897b40543c8d3aac9ffbc9982b8092fb2b
MD5 e0e4f3c0ebe88cb0a3b2d9734f7c5bb5
BLAKE2b-256 f30d014bd92d125835751012441990e7fddd5b1917c313aafd0d57cae48d391b

See more details on using hashes here.

File details

Details for the file chatline-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: chatline-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/24.3.0

File hashes

Hashes for chatline-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 84b3644ee344995f90baa900a41e9636aa0a6148396464e7b4ba975b517bf21b
MD5 839d288d8933dba1fff5fd8dd29ef2f9
BLAKE2b-256 bad05b3f9509cab5249af459acbc65eaa723fb7e84885bce298050ddc020bfec

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