Skip to main content

A GTK graphical interface for chatting with large language models (LLMs)

Reason this release was yanked:

Premature release

Project description

GTK LLM Chat

A GTK graphical interface for chatting with Large Language Models (LLMs).

screenshot

Buy Me A Coffee if you find this project useful.

Key Features

  • Simple and easy-to-use graphical interface built with GTK

  • Support for multiple conversations in independent windows

  • Integration with python-llm for chatting with various LLM models

  • Modern interface using libadwaita

  • Support for real-time streaming responses

  • Message history with automatic scrolling

  • Windows installer and Linux AppImage available

  • Markdown rendering of the responses

  • Sidebar Navigation: Modern sidebar for model/provider selection, parameters, and settings.

  • Model Parameters: Adjust temperature and system prompt per conversation.

  • API Key Management: Banner with symbolic icons for setting/changing API keys per provider.

  • Keyboard Shortcuts:

    • F10: Toggle sidebar
    • F2: Rename conversation
    • Escape: Minimize window
    • Enter: Send message
    • Shift+Enter: New line in input
    • Ctrl+W: Delete the current conversation
  • Conversation Management: Rename and delete conversations.

  • Applet Mode: Run a system tray applet for quick access to recent conversations.

  • Model Selection: Choose from different LLM models.

  • System Prompt: Set a custom system prompt for each conversation.

  • Error Handling: Clear error messages displayed in the chat.

  • Dynamic Input: The input area dynamically adjusts its height.

Installation

pipx install llm               # required by gtk-llm-chat
llm install gtk-llm-chat

You may want to manually copy the .desktop files to ~/.local/share/applications/ to make them available in your application menu.

Downloadable packages

Windows installers and Linux Appimages are available in our releases section.

While they are fully functional, there is no mechanism provided thru the GUI for adding plugins or API keys and no system tray applet support either.

While in the future the UI will be complete, for now, you'll have to manually add your API keys to your keys.json file.

In order to invoke the applet from the AppImage, you can use the --applet command argument.

Dependencies

These are collected here for reference only, let me know if the list needs adjusting.

 # fedora: # sudo dnf install cairo-devel object-introspection-devel gtk4-devel pkgconf-pkg-config gcc redhat-rpm-config
 # debian: # sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-4.0 libadwaita-1-0

System Requirements

  • llm
  • Python 3.8 or higher
  • GTK 4.0
  • libadwaita
  • libayatana-appindicator (optional)

Usage

Running the Application

To start the applet (system tray mode):

llm gtk-applet

To start a single chat window:

llm gtk-chat

Optional arguments:

llm gtk-chat --cid CONVERSATION_ID   # Continue a specific conversation
llm gtk-chat -s "System prompt"      # Set system prompt
llm gtk-chat -m model_name           # Select specific model
llm gtk-chat -c                      # Continue last conversation

Features Overview

  • Use the sidebar to select providers/models, adjust parameters, and manage API keys.
  • API key banner will appear when a provider requires a key. Use the button with the key or open-lock icon to set or change your key.
  • Model parameters (temperature, system prompt) are per conversation and accessible from the sidebar.
  • Keyboard shortcuts for sidebar, rename, minimize, and more (see above).

Development

To set up the development environment:

git clone https://github.com/icarito/gtk-llm-chat.git
cd gtk-llm-chat
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"

Shoulders of giants

This project is made possible thanks to these great components, among others:

License

GPLv3 License - See LICENSE file for more details.

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

gtk_llm_chat-3.0.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

gtk_llm_chat-3.0.0-py3-none-any.whl (77.8 kB view details)

Uploaded Python 3

File details

Details for the file gtk_llm_chat-3.0.0.tar.gz.

File metadata

  • Download URL: gtk_llm_chat-3.0.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for gtk_llm_chat-3.0.0.tar.gz
Algorithm Hash digest
SHA256 3efcc6e4ff3b359e92103bc4324b48cebe6695a2d2be64b2ab8c19fcb88a3737
MD5 2b785dbc8b9588d8ad44f7bac962babc
BLAKE2b-256 911daec81fdb5c59b07949c63184f8accb8c0576c170be1588d96a38ef1d49b9

See more details on using hashes here.

File details

Details for the file gtk_llm_chat-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: gtk_llm_chat-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 77.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for gtk_llm_chat-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc3c68a05e8a081a1ede720849023f3682397c40c0f687af56c8140c717f3bb1
MD5 c41a03b5fb08e466b3f8d754ac08f303
BLAKE2b-256 8ae46bfbaf094826df4337dc677f7ba687841fcb23eaee953ed654a51de6cd71

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