Skip to main content

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

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

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

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-2.3.0.tar.gz (457.6 kB 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-2.3.0-py3-none-any.whl (72.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gtk_llm_chat-2.3.0.tar.gz
  • Upload date:
  • Size: 457.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for gtk_llm_chat-2.3.0.tar.gz
Algorithm Hash digest
SHA256 107f99638317a810f5d1f742afbeb1f190e1e6b82368c2f782ae6681d1e63c43
MD5 bdd983aac1dc60b5d9ca259342096941
BLAKE2b-256 147900a684d266bfea7f022092038f3cce61e85d50b36dc1bf2c581669c8faab

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gtk_llm_chat-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d1e2e14c0bc485153dff92db45971d2ccb3d8d2a1a6653792369136f97222f7
MD5 283a016b2f414dcb31518619f6585ebd
BLAKE2b-256 8fa1a0619c79586e284f425c934789fdfc694974563a93fe1efe6c485b69e6ec

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