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
  • Markdown rendering of the responses
  • Support for fragments: Include external content (files, URLs, or text snippets) in your prompts.
  • 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.
  • Keyboard Shortcuts:
    • Enter: Send message.
    • Shift+Enter: New line in the input.
    • Ctrl+W: Delete the current conversation.

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.

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

Run the application:

llm gtk-applet

or for an individual chat:

llm gtk-chat

With 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

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.2.1.tar.gz (326.5 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.2.1-py3-none-any.whl (47.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gtk_llm_chat-2.2.1.tar.gz
Algorithm Hash digest
SHA256 118b42b1c0e0c4fdd08bb12175d5ce0aae2d17d08308ab548453d48dec56d282
MD5 7a795dc1674c7773f8862b7a605dae4a
BLAKE2b-256 88ab63ae5fae46bc82f8fc1e951fa38762c91d8eb9e9ce79b987972b7fbca41a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gtk_llm_chat-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9312d47d0dc16c327deb0459ea40536b7a19d81cdcb7a922c9b0552542bec1bc
MD5 6b77b135d72f6b2d0ff6a158218ab877
BLAKE2b-256 93834d9a0c50cd2860017d188278db22c020feb2d9596765d8044a10316b9880

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