Bavarder / Bavarder

Chit-chat with an AI

Home Page:https://bavarder.codeberg.page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Local" provider forgets input after closing preference dialog

rsolvang opened this issue · comments

Describe the bug
My input into the API URL and model name fields is not saved when using the Local provider.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Preferences'
  2. Click on 'Local' to show more input fields.
  3. Add custom data to API URL and Model text fields, press the blue confirm-button (or enter).
  4. Enable the Local provider.
  5. Close the Preference dialog.
  6. Open it again and the custom data is replaced by the default OpenAI URL.

Expected behavior
That my URL and Model input is saved.

Environment
Please post the content of About > Troubleshooting > Debugging Information

io.github.Bavarder.Bavarder 1.0.0
Environment: GNOME
Gtk: 4.12.1
Python: 3.11.5
OS: Linux 6.4.15-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 7 00:25:01 UTC 2023

Additional context
I also tried the new built-in model downloader, but there is no way to select them as a provider.

@rsolvang for using downloaded models, you need to switch into offline mode, by clicking on the cloud.

Is the model saved or not ?

Ah, thanks! This should probably be mentioned in the docs :)

Regarding the bug about input not being saved in the preferences; is this a know problem or is it only happening on my end?

yeah, the cloud isn't very intuitive for a lot of users, i need to find a better way :)

For the bug, it's a now a know problem:)

I'm trying to use Bavarder with my OpenAI-compatible API. I seem to have the same "forgets" problem. I've tried it with the cloud enabled and disabled. The result is the same: the "Local" provider always forgets the API URL and model name to use. I installed 1.0.0 from flathub.

The problem is that this line of code fails:

Traceback (most recent call last):
  File "/app/share/bavarder/bavarder/providers/local.py", line 39, in on_apply
    openai.api_key = api_key
    ^^^^^^
NameError: name 'openai' is not defined. Did you mean: 'open'?

I'm trying to use Bavarder with my OpenAI-compatible API. I seem to have the same "forgets" problem. I've tried it with the cloud enabled and disabled. The result is the same: the "Local" provider always forgets the API URL and model name to use. I installed 1.0.0 from flathub.

Same here, trying with Ollama since they just added OpenAI compatibility

Fixed with #58 i guess