11 Commits
0.7.0 ... 0.7.1

Author SHA1 Message Date
jeffser
dac4c36caa Preparing for 0.7.1 2024-05-23 12:02:18 -06:00
jeffser
96bdf360df Better sidebar 2024-05-23 12:01:25 -06:00
jeffser
54fbe3b505 Preparing for 0.7.1 2024-05-23 11:53:06 -06:00
jeffser
3f76dfdbe9 Changed CSS so that chat controls only appearing while hovering 2024-05-23 09:43:16 -06:00
jeffser
763cb98b33 Quick fix to remote connection 2024-05-23 09:41:43 -06:00
jeffser
eb2379585a Removed reference to CSS 2024-05-23 09:40:29 -06:00
jeffser
541b5e032f Replaced CSS file for string 2024-05-23 09:38:03 -06:00
jeffser
43c24c9150 Minor spelling mistake :( 2024-05-22 23:54:50 -06:00
jeffser
ada2893069 Quick fix on 'connection_error' dialog 2024-05-22 23:43:57 -06:00
jeffser
9707bdc2bb Added Mobile as an available form factor 2024-05-22 23:29:38 -06:00
Jeffry Samuel
157c43e969 Better README 2024-05-22 21:51:31 -06:00
9 changed files with 66 additions and 58 deletions

View File

@@ -1,20 +1,15 @@
<img src="https://jeffser.com/images/alpaca/logo.svg"> <p align="center"><img src="https://jeffser.com/images/alpaca/logo.svg"></p>
# Alpaca # Alpaca
An [Ollama](https://github.com/ollama/ollama) client made with GTK4 and Adwaita. <a href='https://flathub.org/apps/com.jeffser.Alpaca'><img width='240' alt='Download on Flathub' src='https://flathub.org/api/badge?locale=en'/></a>
Alpaca is an [Ollama](https://github.com/ollama/ollama) client where you can manage and chat with multiple models, Alpaca provides an easy and begginer friendly way of interacting with local AI, everything is open source and powered by Ollama.
--- ---
> [!WARNING] > [!WARNING]
> This project is not affiliated at all with Ollama, I'm not responsible for any damages to your device or software caused by running code given by any models. > This project is not affiliated at all with Ollama, I'm not responsible for any damages to your device or software caused by running code given by any AI models.
> [!important]
> This is my first GTK4 / Adwaita / Python app, so it might crash and some features are still under development, please report any errors if you can, thank you!
## Features! ## Features!
- Talk to multiple models in the same conversation - Talk to multiple models in the same conversation

View File

@@ -6,3 +6,4 @@ Terminal=false
Type=Application Type=Application
Categories=Utility;Development;Chat; Categories=Utility;Development;Chat;
StartupNotify=true StartupNotify=true
X-Purism-FormFactor=Workstation;Mobile;

View File

@@ -51,6 +51,19 @@
<url type="homepage">https://github.com/Jeffser/Alpaca</url> <url type="homepage">https://github.com/Jeffser/Alpaca</url>
<url type="donation">https://github.com/sponsors/Jeffser</url> <url type="donation">https://github.com/sponsors/Jeffser</url>
<releases> <releases>
<release version="0.7.1" date="2024-05-23">
<url type="details">https://github.com/Jeffser/Alpaca/releases/tag/0.7.1</url>
<description>
<p>Bug Fixes</p>
<ul>
<li>Fixed: Minor spelling mistake</li>
<li>Added 'mobile' as a supported form factor</li>
<li>Fixed: 'Connection Error' dialog not working properly</li>
<li>Fixed: App might freeze randomly on startup</li>
<li>Changed 'chats' label on sidebar for 'Alpaca'</li>
</ul>
</description>
</release>
<release version="0.7.0" date="2024-05-22"> <release version="0.7.0" date="2024-05-22">
<url type="details">https://github.com/Jeffser/Alpaca/releases/tag/0.7.0</url> <url type="details">https://github.com/Jeffser/Alpaca/releases/tag/0.7.0</url>
<description> <description>

View File

@@ -1,5 +1,5 @@
project('Alpaca', project('Alpaca',
version: '0.7.0', version: '0.7.1',
meson_version: '>= 0.62.0', meson_version: '>= 0.62.0',
default_options: [ 'warning_level=2', 'werror=false', ], default_options: [ 'warning_level=2', 'werror=false', ],
) )

View File

@@ -48,7 +48,7 @@ class AlpacaApplication(Adw.Application):
application_name='Alpaca', application_name='Alpaca',
application_icon='com.jeffser.Alpaca', application_icon='com.jeffser.Alpaca',
developer_name='Jeffry Samuel Eduarte Rojas', developer_name='Jeffry Samuel Eduarte Rojas',
version='0.7.0', version='0.7.1',
developers=['Jeffser https://jeffser.com'], developers=['Jeffser https://jeffser.com'],
designers=['Jeffser https://jeffser.com'], designers=['Jeffser https://jeffser.com'],
translator_credits='Alex K (Russian) https://github.com/alexkdeveloper\nJeffser (Spanish) https://jeffser.com', translator_credits='Alex K (Russian) https://github.com/alexkdeveloper\nJeffser (Spanish) https://jeffser.com',

View File

@@ -31,8 +31,7 @@ alpaca_sources = [
'main.py', 'main.py',
'window.py', 'window.py',
'connection_handler.py', 'connection_handler.py',
'available_models.py', 'available_models.py'
'style.css'
] ]
install_data(alpaca_sources, install_dir: moduledir) install_data(alpaca_sources, install_dir: moduledir)

View File

@@ -1,19 +0,0 @@
.chat_row:not(:selected) {
}
.chat_row:not(:selected):hover {
}
.chat_row box.header {
font-size: 14px;
}
.chat_row box {
margin: 0;
}
.chat_row button {
opacity: 0;
transition: opacity .05s;
}
.chat_row:hover button, .chat_row:selected button {
opacity: 1;
}

View File

@@ -112,7 +112,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
_("Please select a model before chatting"), _("Please select a model before chatting"),
_("Chat cannot be cleared while receiving a message"), _("Chat cannot be cleared while receiving a message"),
_("That tag is already being pulled"), _("That tag is already being pulled"),
_("That tag has been pulled alreay") _("That tag has been pulled already")
], ],
"good": [ "good": [
_("Model deleted successfully"), _("Model deleted successfully"),
@@ -194,6 +194,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
message_overlay.set_child(message_box) message_overlay.set_child(message_box)
#message_overlay.add_overlay(delete_button) #message_overlay.add_overlay(delete_button)
# I don't have the energy right now to do this :) # I don't have the energy right now to do this :)
## TODO IDEA: I could count which message it is I'm trying to delete, that way I could get the position on the list, this is probably the best approach, good luck me from the future.
self.chat_container.append(message_overlay) self.chat_container.append(message_overlay)
if bot: if bot:
@@ -886,20 +887,18 @@ class AlpacaWindow(Adw.ApplicationWindow):
def reconnect_remote(self, dialog, task=None, entry=None): def reconnect_remote(self, dialog, task=None, entry=None):
response = dialog.choose_finish(task) response = dialog.choose_finish(task)
if not task or response == "connect": dialog.force_close()
if not task or response == "remote":
self.ollama_url = entry.get_text() self.ollama_url = entry.get_text()
self.remote_url = self.ollama_url self.remote_url = self.ollama_url
self.remote_connection_entry.set_text(self.remote_url)
if self.verify_connection() == False: self.connection_error() if self.verify_connection() == False: self.connection_error()
else:
dialog.force_close()
elif response == "local": elif response == "local":
self.run_remote = False self.run_remote = False
self.ollama_url = f"http://127.0.0.1:{self.local_ollama_port}" self.ollama_url = f"http://127.0.0.1:{self.local_ollama_port}"
self.start_instance() self.start_instance()
if self.verify_connection() == False: self.connection_error() if self.verify_connection() == False: self.connection_error()
else: else: self.remote_connection_switch.set_active(False)
self.remote_connection_switch.set_active(False)
dialog.force_close()
elif response == "close": elif response == "close":
self.destroy() self.destroy()
@@ -998,7 +997,27 @@ class AlpacaWindow(Adw.ApplicationWindow):
GtkSource.init() GtkSource.init()
#CSS #CSS
css_provider = Gtk.CssProvider() css_provider = Gtk.CssProvider()
css_provider.load_from_path(os.path.join(self.app_dir, "share/Alpaca/alpaca/style.css")) css_provider.load_from_data(b"""
.chat_row:not(:selected) {
}
.chat_row:not(:selected):hover {
}
.chat_row box.header {
font-size: 14px;
}
.chat_row box {
margin: 0;
}
.chat_row button {
opacity: 0;
transition: opacity .05s;
}
.chat_row:hover button {
opacity: 1;
}
""")
display = Gdk.Display.get_default() display = Gdk.Display.get_default()
Gtk.StyleContext.add_provider_for_display( Gtk.StyleContext.add_provider_for_display(
display, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION display, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION

View File

@@ -41,12 +41,25 @@
<property name="margin-end">12</property> <property name="margin-end">12</property>
<property name="spacing">12</property> <property name="spacing">12</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkButton" id="add_chat_button">
<property name="label" translatable="yes">Chats</property> <property name="tooltip-text" translatable="yes">New chat</property>
<property name="hexpand">true</property>
<property name="halign">1</property>
<style> <style>
<class name="title-1"/> <class name="flat"/>
</style>
<child>
<object class="AdwButtonContent">
<property name="icon-name">tab-new-symbolic</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="no">Alpaca</property>
<property name="hexpand">true</property>
<property name="halign">3</property>
<style>
<class name="title-4"/>
</style> </style>
</object> </object>
</child> </child>
@@ -76,19 +89,6 @@
</child> </child>
</object> </object>
</child> </child>
<child>
<object class="GtkButton" id="add_chat_button">
<property name="tooltip-text" translatable="yes">New chat</property>
<style>
<class name="flat"/>
</style>
<child>
<object class="AdwButtonContent">
<property name="icon-name">tab-new-symbolic</property>
</object>
</child>
</object>
</child>
</object> </object>
</child> </child>
<child> <child>