Files
PyLlama/pyllama.ui
T
2026-03-23 05:29:18 +01:00

231 lines
10 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.99.3 -->
<interface>
<!-- interface-name pyllama.ui -->
<!-- interface-description The main window for the PyLlama interface program for ollama. -->
<!-- interface-copyright PyLlama - a simple interface to ollama
Copyright (C) 2026 Emil Kosz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. -->
<!-- interface-authors Emil Kosz -->
<requires lib="gtk" version="4.20"/>
<template class="main_window" parent="GtkApplicationWindow">
<property name="accessible-role">main</property>
<property name="decorated">True</property>
<property name="default-height">600</property>
<property name="default-width">800</property>
<property name="show-menubar">False</property>
<property name="titlebar">
<object class="GtkHeaderBar">
<child>
<object class="GtkDropDown" id="model_list">
<property name="css-name">dropdown</property>
<property name="tooltip-text">Select model</property>
</object>
</child>
<child>
<object class="GtkMenuButton">
<property name="active">False</property>
<property name="icon-name">applications-engineering-symbolic</property>
<property name="popover">
<object class="GtkPopover" id="model_parameters">
<property name="child">
<object class="GtkGrid">
<property name="column-homogeneous">False</property>
<property name="column-spacing">12</property>
<property name="orientation">horizontal</property>
<property name="row-homogeneous">False</property>
<property name="row-spacing">0</property>
<child>
<object class="GtkLabel">
<property name="label">GPU layers</property>
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkSpinButton" id="gpu_layers_spin">
<property name="adjustment">
<object class="GtkAdjustment">
<property name="step-increment">1.0</property>
<property name="upper">50.0</property>
<property name="value">25.0</property>
</object>
</property>
<property name="climb-rate">0.0</property>
<property name="halign">end</property>
<property name="numeric">True</property>
<property name="value">25.0</property>
<signal name="change-value" handler="gpu_layers_spin_changed"/>
<layout>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Low VRAM</property>
<layout>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkSwitch" id="low_vram_switch">
<property name="halign">end</property>
<property name="hexpand">False</property>
<property name="hexpand-set">False</property>
<property name="receives-default">False</property>
<signal name="state-set" handler="low_vram_switch_set"/>
<layout>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">No. threads</property>
<layout>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
<child>
<object class="GtkSpinButton" id="threads_spin">
<property name="adjustment">
<object class="GtkAdjustment">
<property name="lower">0.0</property>
<property name="step-increment">1.0</property>
<property name="upper">32.0</property>
</object>
</property>
<signal name="change-value" handler="threads_spin_changed"/>
<layout>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Temperature</property>
<layout>
<property name="column">0</property>
<property name="row">3</property>
</layout>
</object>
</child>
<child>
<object class="GtkSpinButton" id="temperature_spin">
<property name="adjustment">
<object class="GtkAdjustment">
<property name="lower">0.01</property>
<property name="step-increment">0.01</property>
<property name="upper">5.0</property>
</object>
</property>
<property name="digits">2</property>
<property name="value">1.0</property>
<signal name="change-value" handler="temperature_spin_changed"/>
<layout>
<property name="column">1</property>
<property name="row">3</property>
</layout>
</object>
</child>
</object>
</property>
</object>
</property>
</object>
</child>
</object>
</property>
<child>
<object class="GtkBox">
<property name="baseline-child">-1</property>
<property name="homogeneous">False</property>
<property name="margin-bottom">8</property>
<property name="margin-end">8</property>
<property name="margin-start">8</property>
<property name="margin-top">8</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="chat_scroll">
<child>
<object class="GtkListBox" id="chat_list">
<property name="vexpand">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow">
<property name="max-content-height">200</property>
<property name="propagate-natural-height">True</property>
<child>
<object class="GtkTextView" id="prompt">
<property name="bottom-margin">14</property>
<property name="css-name">textview</property>
<property name="hexpand">True</property>
<property name="left-margin">12</property>
<property name="monospace">False</property>
<property name="pixels-above-lines">0</property>
<property name="pixels-below-lines">0</property>
<property name="pixels-inside-wrap">0</property>
<property name="right-margin">12</property>
<property name="top-margin">14</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="send_button">
<property name="halign">fill</property>
<property name="hexpand">False</property>
<property name="hexpand-set">False</property>
<property name="icon-name">media-playback-start-symbolic</property>
<signal name="clicked" handler="send_button_clicked"/>
</object>
</child>
<child>
<object class="GtkButton" id="cancel_button">
<property name="icon-name">media-playback-stop-symbolic</property>
<property name="visible">False</property>
<signal name="clicked" handler="cancel_button_clicked"/>
<accessibility>
<state name="hidden">True</state>
</accessibility>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
<object class="GtkEventControllerKey" id="prompt_controller">
<signal name="key-pressed" handler="prompt_key_pressed"/>
</object>
</interface>