Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dac4c36caa | ||
|
|
96bdf360df | ||
|
|
54fbe3b505 | ||
|
|
3f76dfdbe9 | ||
|
|
763cb98b33 | ||
|
|
eb2379585a | ||
|
|
541b5e032f | ||
|
|
43c24c9150 | ||
|
|
ada2893069 | ||
|
|
9707bdc2bb | ||
|
|
157c43e969 |
13
README.md
13
README.md
@@ -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
|
||||
|
||||
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]
|
||||
> 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.
|
||||
|
||||
> [!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!
|
||||
> 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.
|
||||
|
||||
## Features!
|
||||
- Talk to multiple models in the same conversation
|
||||
|
||||
@@ -6,3 +6,4 @@ Terminal=false
|
||||
Type=Application
|
||||
Categories=Utility;Development;Chat;
|
||||
StartupNotify=true
|
||||
X-Purism-FormFactor=Workstation;Mobile;
|
||||
@@ -51,6 +51,19 @@
|
||||
<url type="homepage">https://github.com/Jeffser/Alpaca</url>
|
||||
<url type="donation">https://github.com/sponsors/Jeffser</url>
|
||||
<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">
|
||||
<url type="details">https://github.com/Jeffser/Alpaca/releases/tag/0.7.0</url>
|
||||
<description>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project('Alpaca',
|
||||
version: '0.7.0',
|
||||
version: '0.7.1',
|
||||
meson_version: '>= 0.62.0',
|
||||
default_options: [ 'warning_level=2', 'werror=false', ],
|
||||
)
|
||||
|
||||
@@ -48,7 +48,7 @@ class AlpacaApplication(Adw.Application):
|
||||
application_name='Alpaca',
|
||||
application_icon='com.jeffser.Alpaca',
|
||||
developer_name='Jeffry Samuel Eduarte Rojas',
|
||||
version='0.7.0',
|
||||
version='0.7.1',
|
||||
developers=['Jeffser https://jeffser.com'],
|
||||
designers=['Jeffser https://jeffser.com'],
|
||||
translator_credits='Alex K (Russian) https://github.com/alexkdeveloper\nJeffser (Spanish) https://jeffser.com',
|
||||
|
||||
@@ -31,8 +31,7 @@ alpaca_sources = [
|
||||
'main.py',
|
||||
'window.py',
|
||||
'connection_handler.py',
|
||||
'available_models.py',
|
||||
'style.css'
|
||||
'available_models.py'
|
||||
]
|
||||
|
||||
install_data(alpaca_sources, install_dir: moduledir)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
||||
_("Please select a model before chatting"),
|
||||
_("Chat cannot be cleared while receiving a message"),
|
||||
_("That tag is already being pulled"),
|
||||
_("That tag has been pulled alreay")
|
||||
_("That tag has been pulled already")
|
||||
],
|
||||
"good": [
|
||||
_("Model deleted successfully"),
|
||||
@@ -194,6 +194,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
||||
message_overlay.set_child(message_box)
|
||||
#message_overlay.add_overlay(delete_button)
|
||||
# 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)
|
||||
|
||||
if bot:
|
||||
@@ -886,20 +887,18 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
||||
|
||||
def reconnect_remote(self, dialog, task=None, entry=None):
|
||||
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.remote_url = self.ollama_url
|
||||
self.remote_connection_entry.set_text(self.remote_url)
|
||||
if self.verify_connection() == False: self.connection_error()
|
||||
else:
|
||||
dialog.force_close()
|
||||
elif response == "local":
|
||||
self.run_remote = False
|
||||
self.ollama_url = f"http://127.0.0.1:{self.local_ollama_port}"
|
||||
self.start_instance()
|
||||
if self.verify_connection() == False: self.connection_error()
|
||||
else:
|
||||
self.remote_connection_switch.set_active(False)
|
||||
dialog.force_close()
|
||||
else: self.remote_connection_switch.set_active(False)
|
||||
elif response == "close":
|
||||
self.destroy()
|
||||
|
||||
@@ -998,7 +997,27 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
||||
GtkSource.init()
|
||||
#CSS
|
||||
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()
|
||||
Gtk.StyleContext.add_provider_for_display(
|
||||
display, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
|
||||
|
||||
@@ -41,12 +41,25 @@
|
||||
<property name="margin-end">12</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Chats</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="halign">1</property>
|
||||
<object class="GtkButton" id="add_chat_button">
|
||||
<property name="tooltip-text" translatable="yes">New chat</property>
|
||||
<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>
|
||||
</object>
|
||||
</child>
|
||||
@@ -76,19 +89,6 @@
|
||||
</child>
|
||||
</object>
|
||||
</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>
|
||||
</child>
|
||||
<child>
|
||||
|
||||
Reference in New Issue
Block a user