A GTK graphical interface for chatting with Large Language Models (LLMs).
if you find this project useful.
-
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 sidebarF2
: Rename conversationEscape
: Minimize windowEnter
: Send messageShift+Enter
: New line in inputCtrl+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.
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.
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.
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
- llm
- Python 3.8 or higher
- GTK 4.0
- libadwaita
- libayatana-appindicator (optional)
To start the applet (system tray mode):
llm gtk-applet
To start a single chat window:
llm gtk-chat
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
- 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).
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]"
This project is made possible thanks to these great components, among others:
- llm by @simonw
- hello-world-gtk by @zevlee
GPLv3 License - See LICENSE file for more details.