Jeffser / Alpaca

An Ollama client made with GTK4 and Adwaita
GNU General Public License v3.0
116 stars 18 forks source link

Bugs with startup and local instance #88

Closed oritwoen closed 3 weeks ago

oritwoen commented 3 weeks ago

Describe the bug

  1. When starting the application, it throws an error from time to time. After several attempts, the application is able to run without error.
  2. When selecting a local instance, a modal window is shown with each generated message to reconnect.
  3. Chats and settings are not saved. After turning the app off and on, I have to set the URL to the local instance again and there is no chat history.

Expected behavior No above errors.

Screenshots I made an exact reproduction on video

Additional context I use ArchLinux without flatpak, Alpaca build as native package with PKGBUILD

Jeffser commented 3 weeks ago

well, technically Flatpak is the only way Alpaca is supported, what I think is happening is that it can't get the folder $XDG_CONFIG_HOME or $XDG_DATA_HOME maybe add those as environment variables

oritwoen commented 3 weeks ago

Thank you @Jeffser. Setting environment variables for XDG solved all the problems. I can start chatting ;D

Jeffser commented 3 weeks ago

Thank you @Jeffser. Setting environment variables for XDG solved all the problems. I can start chatting ;D

Good to hear, enjoy the app

Jeffser commented 3 weeks ago

I wanted to ask you, you made the PKGBUILD right? could I take a look at it? it would be interesting to add the app at least to the AUR

oritwoen commented 3 weeks ago

@Jeffser

pkgname=alpaca
pkgdesc="An Ollama client made with GTK4 and Adwaita"
license=(GPL3)

arch=(x86_64)
pkgver=0.9.3
pkgrel=1

url=https://github.com/Jeffser/Alpaca

depends=(
    ollama
    python-pillow
    python-requests
)

makedepends=(
    git
    meson
)

b2sums=(SKIP)
source=(git+https://github.com/jeffser/alpaca.git#tag=0.9.3)

build() {
    arch-meson $pkgname build

    meson compile -C build
}

package() {
    meson install -C build --destdir "$pkgdir"
}
loulou64490 commented 3 weeks ago

depends=(\n\tollama

Ollama is already included in Alpaca

But it's would be nice a version of Alpaca without Ollama, so the app would be smaller and we would use our own ollama instance

oritwoen commented 3 weeks ago

You're right. This is my private PKGBUILD file. Ollama is not required, but I added this line for myself because I like to use libraries and programs compiled directly on my computer instead of those included in the bundle.

And this is only for the organization, it will also work without it.

However, as you write, I would recommend making a condition when building the application in which it is checked whether there is a local binary or libs ollama on the computer and if so, not bundling it in alpaca. Then the dynamic bundle will weigh several mb or 300 mb depending on whether someone has the local version on their computer.