Show HN:轻如终端——GTK LLM 聊天前端
Show HN: Light like the Terminal – Meet GTK LLM Chat Front End

原始链接: https://github.com/icarito/gtk-llm-chat/

GTK-LLM-Chat 是一款用户友好的 GTK 应用,用于与基于 `python-llm` 的大型语言模型 (LLM) 交互。它提供了一个现代化、直观的界面,具有在单独窗口中进行多个并发对话、实时流式响应和自动滚动消息历史记录等功能。响应使用 Markdown 渲染,以增强可读性。 主要功能包括:片段支持(用于将外部内容整合到提示中)、会话管理(重命名、删除)、系统托盘小程序(用于快速访问)、模型选择和自定义系统提示。界面具有动态输入区域调整大小和有用的键盘快捷键(Enter 发送,Shift+Enter 换行)。错误消息会清晰地显示。 安装需要 `python-llm` 和相应的 GTK 库。启动应用程序可以开始新的聊天或恢复现有聊天,并可以选择指定会话 ID、系统提示或模型。文档中还提供了使用虚拟环境的开发设置说明。该项目采用 GPLv3 许可。

作者 icarito 创建了 gtk-llm-chat,这是一个轻量级的基于 GTK 的前端,用于通过 `llm` 命令行工具与大型语言模型 (LLM) 交互。由于对 Electron 应用感到沮丧,并希望找到一种更简化的方式来同时与 Gemini、ChatGPT 和 DeepSeek 等不同的 LLM 交谈,icarito 构建了这个应用程序,以便于以直观的方式访问 LLM 对话。gtk-llm-chat 作为 `llm` (可在 llm.datasette.io 获取) 的插件,提供一个小程序和一个简单的窗口用于交互。作者正在寻求反馈、代码请求和通过 buymeacoffee.com 的支持。该项目允许用户根据自己的条件与 LLM 交互,避免使用资源密集型的 Electron 应用程序。
相关文章

原文

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

screenshot

  • 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
  • Keyboard shortcuts (Enter to send, Shift+Enter for new line)
  • 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.
pipx install llm               # required by gtk-llm-chat
llm install gtk-chat
  • llm
  • Python 3.8 or higher
  • GTK 4.0
  • libadwaita
  • libayatana-appindicator

Run the application:

or for an individual 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

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

GPLv3 License - See LICENSE file for more details.

联系我们 contact @ memedata.com