9 Commits
2.0.4 ... 2.0.6

Author SHA1 Message Date
jeffser
22116b0d1e Preparing for 2.0.6 2024-09-29 16:10:36 -06:00
jeffser
03d92de88b Merge branch 'main' of github.com-jeffser:Jeffser/Alpaca 2024-09-29 16:07:19 -06:00
jeffser
0be0942da3 Fix: Text rendering causing crash because of notification being in a different thread 2024-09-29 16:07:12 -06:00
Jeffry Samuel
b488b64473 Added instructions for Snap 2024-09-25 14:20:57 -06:00
jeffser
56eac5ccd6 Removed unnecesary line from release notes 2024-09-25 13:50:54 -06:00
jeffser
ad5d6dfa41 Preparing for 2.0.5 2024-09-25 13:50:32 -06:00
Jeffry Samuel
c4fb424514 Removed tag from Snap 2024-09-25 13:23:40 -06:00
সৌম্যদীপ ঘোষ
28e09d5c2e snap: improve the snap (#318)
1. cleaned up the manifest
2. added arm64 support
2024-09-25 12:21:01 -06:00
jeffser
633507fecd Quick fix to message generation 2024-09-25 09:34:12 -06:00
8 changed files with 46 additions and 196 deletions

View File

@@ -45,6 +45,14 @@ You can find the latest stable version of the app on [Flathub](https://flathub.o
Everytime a new version is published they become available on the [releases page](https://github.com/Jeffser/Alpaca/releases) of the repository Everytime a new version is published they become available on the [releases page](https://github.com/Jeffser/Alpaca/releases) of the repository
### Snap Package
You can also find the Snap package on the [releases page](https://github.com/Jeffser/Alpaca/releases), to install it run this command:
```BASH
sudo snap install ./{package name} --dangerous
```
The `--dangerous` comes from the package being installed without any involvement of the SnapStore, I'm working on getting the app there, but for now you can test the app this way.
### Building Git Version ### Building Git Version
Note: This is not recommended since the prerelease versions of the app often present errors and general instability. Note: This is not recommended since the prerelease versions of the app often present errors and general instability.

View File

@@ -78,6 +78,24 @@
<url type="contribute">https://github.com/Jeffser/Alpaca/discussions/154</url> <url type="contribute">https://github.com/Jeffser/Alpaca/discussions/154</url>
<url type="vcs-browser">https://github.com/Jeffser/Alpaca</url> <url type="vcs-browser">https://github.com/Jeffser/Alpaca</url>
<releases> <releases>
<release version="2.0.6" date="2024-09-29">
<url type="details">https://github.com/Jeffser/Alpaca/releases/tag/2.0.6</url>
<description>
<p>Fixes</p>
<ul>
<li>Fixed message notification sometimes crashing text rendering because of them running on different threads</li>
</ul>
</description>
</release>
<release version="2.0.5" date="2024-09-25">
<url type="details">https://github.com/Jeffser/Alpaca/releases/tag/2.0.5</url>
<description>
<p>Fixes</p>
<ul>
<li>Fixed message generation sometimes failing</li>
</ul>
</description>
</release>
<release version="2.0.4" date="2024-09-22"> <release version="2.0.4" date="2024-09-22">
<url type="details">https://github.com/Jeffser/Alpaca/releases/tag/2.0.4</url> <url type="details">https://github.com/Jeffser/Alpaca/releases/tag/2.0.4</url>
<description> <description>

View File

@@ -1,5 +1,5 @@
project('Alpaca', 'c', project('Alpaca', 'c',
version: '2.0.4', version: '2.0.6',
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

@@ -1,9 +0,0 @@
[Desktop Entry]
Name=alpaca
Exec=alpaca
Icon=${SNAP}/meta/gui/com.jeffser.Alpaca.svg
Terminal=false
Type=Application
Categories=Utility;Development;Chat;
Keywords=ai;ollama;llm
X-Purism-FormFactor=Workstation;Mobile;

View File

@@ -1,150 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="128px"
viewBox="0 0 128 128"
width="128px"
version="1.1"
id="svg26"
sodipodi:docname="com.jeffser.Alpaca.svg"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs26" />
<sodipodi:namedview
id="namedview26"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="6.65625"
inkscape:cx="64"
inkscape:cy="64"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg26" />
<linearGradient
id="a"
gradientUnits="userSpaceOnUse"
x1="48"
x2="48"
y1="88"
y2="48">
<stop
offset="0"
stop-color="#b6d1f2"
id="stop1" />
<stop
offset="1"
stop-color="#e9eef4"
id="stop2" />
</linearGradient>
<path
d="m 2 66 h 24 v 12 h -24 z m 0 0"
fill="#99c1f1"
id="path2" />
<path
d="m 12.324219 56 h 3.351562 c 5.703125 0 10.324219 4.621094 10.324219 10.324219 v 1.351562 c 0 5.703125 -4.621094 10.324219 -10.324219 10.324219 h -3.351562 c -5.703125 0 -10.324219 -4.621094 -10.324219 -10.324219 v -1.351562 c 0 -5.703125 4.621094 -10.324219 10.324219 -10.324219 z m 0 0"
fill="#99c1f1"
id="path3" />
<g
fill="#5e5c64"
id="g7">
<path
d="m 82 101 h 8 v 23 h -8 z m 0 0"
id="path4" />
<path
d="m 100 101 h 8 v 23 h -8 z m 0 0"
id="path5" />
<path
d="m 20 101 h 8 v 23 h -8 z m 0 0"
id="path6" />
<path
d="m 38 101 h 8 v 23 h -8 z m 0 0"
id="path7" />
</g>
<path
d="m 40.324219 80 h 3.351562 c 5.703125 0 10.324219 4.621094 10.324219 10.324219 v 17.351562 c 0 5.703125 -4.621094 10.324219 -10.324219 10.324219 h -3.351562 c -5.703125 0 -10.324219 -4.621094 -10.324219 -10.324219 v -17.351562 c 0 -5.703125 4.621094 -10.324219 10.324219 -10.324219 z m 0 0"
fill="#6b9bd2"
id="path8" />
<path
d="m 102.324219 80 h 3.351562 c 5.703125 0 10.324219 4.621094 10.324219 10.324219 v 17.351562 c 0 5.703125 -4.621094 10.324219 -10.324219 10.324219 h -3.351562 c -5.703125 0 -10.324219 -4.621094 -10.324219 -10.324219 v -17.351562 c 0 -5.703125 4.621094 -10.324219 10.324219 -10.324219 z m 0 0"
fill="#6b9bd2"
id="path9" />
<path
d="m 40.324219 76 h 3.351562 c 5.703125 0 10.324219 4.621094 10.324219 10.324219 v 17.351562 c 0 5.703125 -4.621094 10.324219 -10.324219 10.324219 h -3.351562 c -5.703125 0 -10.324219 -4.621094 -10.324219 -10.324219 v -17.351562 c 0 -5.703125 4.621094 -10.324219 10.324219 -10.324219 z m 0 0"
fill="#82adde"
id="path10" />
<path
d="m 102.324219 76 h 3.351562 c 5.703125 0 10.324219 4.621094 10.324219 10.324219 v 17.351562 c 0 5.703125 -4.621094 10.324219 -10.324219 10.324219 h -3.351562 c -5.703125 0 -10.324219 -4.621094 -10.324219 -10.324219 v -17.351562 c 0 -5.703125 4.621094 -10.324219 10.324219 -10.324219 z m 0 0"
fill="#82adde"
id="path11" />
<path
d="m 22.324219 80 h 3.351562 c 5.703125 0 10.324219 4.621094 10.324219 10.324219 v 17.351562 c 0 5.703125 -4.621094 10.324219 -10.324219 10.324219 h -3.351562 c -5.703125 0 -10.324219 -4.621094 -10.324219 -10.324219 v -17.351562 c 0 -5.703125 4.621094 -10.324219 10.324219 -10.324219 z m 0 0"
fill="#99c1f1"
id="path12" />
<path
d="m 84.324219 80 h 3.351562 c 5.703125 0 10.324219 4.621094 10.324219 10.324219 v 17.351562 c 0 5.703125 -4.621094 10.324219 -10.324219 10.324219 h -3.351562 c -5.703125 0 -10.324219 -4.621094 -10.324219 -10.324219 v -17.351562 c 0 -5.703125 4.621094 -10.324219 10.324219 -10.324219 z m 0 0"
fill="#99c1f1"
id="path13" />
<path
d="m 28 58 h 72 c 8.835938 0 16 7.164062 16 16 v 18 c 0 8.835938 -7.164062 16 -16 16 h -72 c -8.835938 0 -16 -7.164062 -16 -16 v -18 c 0 -8.835938 7.164062 -16 16 -16 z m 0 0"
fill="#99c1f1"
id="path14" />
<path
d="m 22.324219 76 h 3.351562 c 5.703125 0 10.324219 4.621094 10.324219 10.324219 v 17.351562 c 0 5.703125 -4.621094 10.324219 -10.324219 10.324219 h -3.351562 c -5.703125 0 -10.324219 -4.621094 -10.324219 -10.324219 v -17.351562 c 0 -5.703125 4.621094 -10.324219 10.324219 -10.324219 z m 0 0"
fill="#b6d1f2"
id="path15" />
<path
d="m 84.324219 76 h 3.351562 c 5.703125 0 10.324219 4.621094 10.324219 10.324219 v 17.351562 c 0 5.703125 -4.621094 10.324219 -10.324219 10.324219 h -3.351562 c -5.703125 0 -10.324219 -4.621094 -10.324219 -10.324219 v -17.351562 c 0 -5.703125 4.621094 -10.324219 10.324219 -10.324219 z m 0 0"
fill="#b6d1f2"
id="path16" />
<path
d="m 111 16 c -2.859375 0 -5.5 -1.523438 -6.929688 -4 c -1.425781 -2.476562 -1.425781 -5.523438 0 -8 c 1.429688 -2.476562 4.070313 -4 6.929688 -4"
fill="#bbd6f6"
id="path17" />
<path
d="m 103 8 h 8 v 16 h -8 z m 0 0"
fill="#99c1f1"
id="path18" />
<path
d="m 96 8 h 18 c 2.210938 0 4 1.789062 4 4 v 6 c 0 2.210938 -1.789062 4 -4 4 h -18 c -2.207031 0 -4 -1.789062 -4 -4 v -6 c 0 -2.210938 1.792969 -4 4 -4 z m 0 0"
fill="#e9eef4"
id="path19" />
<path
d="m 100 16 c -2.859375 0 -5.5 -1.523438 -6.929688 -4 c -1.425781 -2.476562 -1.425781 -5.523438 0 -8 c 1.429688 -2.476562 4.070313 -4 6.929688 -4"
fill="#e9eef4"
id="path20" />
<path
d="m 92 16 v 21.675781 c 0 5.71875 -4.605469 10.324219 -10.324219 10.324219 h -53.675781 c -8.863281 0 -16 7.136719 -16 16 v 24 c 0 8.863281 7.136719 16 16 16 h 72 c 8.863281 0 16 -7.136719 16 -16 v -72 z m 0 0"
fill="url(#a)"
id="path21" />
<path
d="m 92 8 h 13 v 16 h -13 z m 0 0"
fill="#e9eef4"
id="path22" />
<path
d="m 104 14 h 22 v 6 c -11.335938 0.6875 -11.078125 8.476562 -17 8 h -5 z m 0 0"
fill="#5e5c64"
id="path23" />
<path
d="m 118 14 c 0 1.378906 -1.117188 2.5 -2.5 2.5 c -1.378906 0 -2.5 -1.121094 -2.5 -2.5 s 1.121094 -2.5 2.5 -2.5 c 1.382812 0 2.5 1.121094 2.5 2.5 z m 0 0"
fill="#e9eef4"
id="path24" />
<path
d="m 113 14 c 0 1.378906 -1.121094 2.5 -2.5 2.5 c -1.382812 0 -2.5 -1.121094 -2.5 -2.5 s 1.117188 -2.5 2.5 -2.5 c 1.378906 0 2.5 1.121094 2.5 2.5 z m 0 0"
fill="#e9eef4"
id="path25" />
<path
d="m 108 14 c 0 1.378906 -1.117188 2.5 -2.5 2.5 c -1.378906 0 -2.5 -1.121094 -2.5 -2.5 s 1.121094 -2.5 2.5 -2.5 c 1.382812 0 2.5 1.121094 2.5 2.5 z m 0 0"
fill="#e9eef4"
id="path26" />
</svg>

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -1,14 +1,10 @@
name: alpaca name: alpaca
base: core24 base: core24
adopt-info: alpaca adopt-info: alpaca
summary: An Ollama client made with GTK4 and Adwaita
description: |
Alpaca is an 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.
platforms: platforms:
amd64: amd64:
arm64:
confinement: strict confinement: strict
grade: stable grade: stable
@@ -23,21 +19,14 @@ slots:
apps: apps:
alpaca: alpaca:
command: usr/bin/alpaca command: usr/bin/alpaca
desktop: meta/gui/alpaca.desktop
common-id: com.jeffser.Alpaca common-id: com.jeffser.Alpaca
extensions: extensions:
- gnome - gnome
plugs: plugs:
- network - network
- network-bind - network-bind
- desktop
- desktop-legacy
- wayland
- opengl
- home - home
- removable-media - removable-media
slots:
- dbus-alpaca
ollama: ollama:
command: bin/ollama command: bin/ollama
@@ -46,7 +35,6 @@ apps:
- removable-media - removable-media
- network - network
- network-bind - network-bind
- opengl
ollama-daemon: ollama-daemon:
command: bin/ollama serve command: bin/ollama serve
@@ -58,7 +46,6 @@ apps:
- removable-media - removable-media
- network - network
- network-bind - network-bind
- opengl
parts: parts:
# Python dependencies # Python dependencies
@@ -75,37 +62,31 @@ parts:
# Ollama plugin # Ollama plugin
ollama: ollama:
plugin: dump plugin: dump
source: https://github.com/ollama/ollama/releases/download/v0.3.10/ollama-linux-amd64.tgz source:
- on amd64: https://github.com/ollama/ollama/releases/download/v0.3.10/ollama-linux-amd64.tgz
- on arm64: https://github.com/ollama/ollama/releases/download/v0.3.10/ollama-linux-arm64.tgz
# Alpaca app # Alpaca app
alpaca: alpaca:
plugin: meson plugin: meson
source-type: git source-type: git
source: https://github.com/Jeffser/Alpaca.git source: https://github.com/Jeffser/Alpaca.git
source-tag: '2.0.2'
source-depth: 1 source-depth: 1
meson-parameters: meson-parameters:
- --prefix=/snap/alpaca/current/usr - --prefix=/snap/alpaca/current/usr
build-packages:
- meson
- ninja-build
- pkg-config
- libcairo2-dev
- libgtk-3-dev
- libglib2.0-dev
- gettext
- desktop-file-utils
- appstream
override-pull: |
craftctl default
craftctl set version=$(git describe --tags --abbrev=0)
override-build: | override-build: |
craftctl default craftctl default
sed -i '1c#!/usr/bin/env python3' $CRAFT_PART_INSTALL/snap/alpaca/current/usr/bin/alpaca sed -i '1c#!/usr/bin/env python3' $CRAFT_PART_INSTALL/snap/alpaca/current/usr/bin/alpaca
stage-packages:
- libnuma1
parse-info: parse-info:
- usr/share/metainfo/com.jeffser.Alpaca.metainfo.xml - usr/share/metainfo/com.jeffser.Alpaca.metainfo.xml
organize: organize:
snap/alpaca/current/usr: usr snap/alpaca/current: .
after: [python-deps] after: [python-deps]
deps:
plugin: nil
after: [alpaca]
stage-packages:
- libnuma1
prime:
- usr/lib/*/libnuma.so.1*

View File

@@ -442,7 +442,7 @@ class message(Gtk.Overlay):
GLib.idle_add(vadjustment.set_value, vadjustment.get_upper()) GLib.idle_add(vadjustment.set_value, vadjustment.get_upper())
elif vadjustment.get_value() + 50 >= vadjustment.get_upper() - vadjustment.get_page_size(): elif vadjustment.get_value() + 50 >= vadjustment.get_upper() - vadjustment.get_page_size():
GLib.idle_add(vadjustment.set_value, vadjustment.get_upper() - vadjustment.get_page_size()) GLib.idle_add(vadjustment.set_value, vadjustment.get_upper() - vadjustment.get_page_size())
self.content_children[-1].insert_at_end(data['message']['content'], False) GLib.idle_add(self.content_children[-1].insert_at_end, data['message']['content'], False)
if 'done' in data and data['done']: if 'done' in data and data['done']:
window.chat_list_box.get_tab_by_name(chat.get_name()).spinner.set_visible(False) window.chat_list_box.get_tab_by_name(chat.get_name()).spinner.set_visible(False)
if window.chat_list_box.get_current_chat().get_name() != chat.get_name(): if window.chat_list_box.get_current_chat().get_name() != chat.get_name():
@@ -451,11 +451,12 @@ class message(Gtk.Overlay):
chat.container.remove(chat.welcome_screen) chat.container.remove(chat.welcome_screen)
chat.welcome_screen = None chat.welcome_screen = None
chat.stop_message() chat.stop_message()
self.set_text(self.content_children[-1].get_label()) self.text = self.content_children[-1].get_label()
GLib.idle_add(self.set_text, self.content_children[-1].get_label())
self.dt = datetime.datetime.now() self.dt = datetime.datetime.now()
self.add_footer(self.dt) GLib.idle_add(self.add_footer, self.dt)
window.show_notification(chat.get_name(), self.text[:200] + (self.text[200:] and '...'), Gio.ThemedIcon.new("chat-message-new-symbolic")) window.show_notification(chat.get_name(), self.text[:200] + (self.text[200:] and '...'), Gio.ThemedIcon.new("chat-message-new-symbolic"))
window.save_history(chat) GLib.idle_add(window.save_history, chat)
else: else:
if self.spinner: if self.spinner:
GLib.idle_add(self.container.remove, self.spinner) GLib.idle_add(self.container.remove, self.spinner)

View File

@@ -575,6 +575,7 @@ Generate a title following these rules:
if response.status_code != 200: if response.status_code != 200:
raise Exception('Network Error') raise Exception('Network Error')
except Exception as e: except Exception as e:
logger.error(e)
self.chat_list_box.get_tab_by_name(chat.get_name()).spinner.set_visible(False) self.chat_list_box.get_tab_by_name(chat.get_name()).spinner.set_visible(False)
chat.busy = False chat.busy = False
GLib.idle_add(message_element.add_action_buttons) GLib.idle_add(message_element.add_action_buttons)