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).
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.
Experimental Windows Version (NEW!)
Windows users can try our experimental version of the GTK LLM Chat app. This version is built using the MSYS2 environment and includes a precompiled GTK4 package.
While it is fully functional, there is no mechanism provided thru the GUI for adding plugins or API keys - and no system tray applet support either.
A welcome assistant is planned for the future, but for now, you can manually add your API keys to your keys.json file.
You will find the Windows version under "Releases" in the GitHub repository.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gtk_llm_chat-2.2.2.tar.gz.
File metadata
- Download URL: gtk_llm_chat-2.2.2.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68540b5d2f09366d89144bf510820f6569e1278e03e7f3ba5836504a47c42b0e
|
|
| MD5 |
cab94c0b21450e83d38da1948e109594
|
|
| BLAKE2b-256 |
caaefa197dc7ccc90571aab5e0dcfe65f3400b9b10d00550412ead04b64b6f30
|
File details
Details for the file gtk_llm_chat-2.2.2-py3-none-any.whl.
File metadata
- Download URL: gtk_llm_chat-2.2.2-py3-none-any.whl
- Upload date:
- Size: 52.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f556ab8a9b1d1998587c954c484a6cd648f498845cf4b66157796b1cd75dfa23
|
|
| MD5 |
fbd1da3dbfe5b6c000b3f549e1ebc04f
|
|
| BLAKE2b-256 |
6220f14d0b6c6d5cc58a942ab909bd7a6f02b5cd76854fc9e4275736e9b19357
|