justyns / silverbullet-ai

Plug for SilverBullet to integrate LLM functionality
https://ai.silverbullet.md/
GNU Affero General Public License v3.0
26 stars 1 forks source link

Unable to change GPT model #32

Closed iamdangry closed 2 months ago

iamdangry commented 2 months ago

Updating the SETTINGS yaml with an alternate GPT model other than the default of 3.5 doesn't appear to take effect.

Snippet from SETTINGS:

ai:
  textModels:
  - name: gpt-4o
    provider: openai
    modelName: gpt-4o

Console output says it detects a change but the model doesn't change: image

This is further confirmed by the API Usage Dashboard showing my API calls are to GPT-3.5-turbo-0125 instead of gpt-4o image

I can update the image model fine via SETTINGS and the console logs the change correctly.

Of course, if I have done a dumb, please let me know.

justyns commented 2 months ago

Hey @iamdangry

If you haven't already, you also need to run AI: Select Text Model from Config to actually select the model you want to use:

image image

I'm realizing now there probably isn't a good indication that you have to do that 😅

The selected model is per client (similar to the dark mode setting in sb). I think we can improve this though and have the default model change automatically if it's the only one in the list like in your screenshot

iamdangry commented 2 months ago

Ahhhh that did the trick. Thanks!

Odd that changing the image model in the settings updated automatically? Atleast that seemed to be what was happening based off the console output. Is that the expected behaviour? Think this is what confused me and I didn't bother to look in the command palette like a smart user 😂

Edit: +1 for settings defining the model if it is the only option. Something like dark mode being per client doesn't bother me much, but if I have defined a setting, would be great if it sticks 🙂

justyns commented 2 months ago

Thanks @iamdangry, I'm glad that worked!

I pushed a new update so if there's only a single text or image model in the settings, it'll always select it as the current model.

Odd that changing the image model in the settings updated automatically? Atleast that seemed to be what was happening based off the console output. Is that the expected behaviour?

What you saw with the image model is the expected behavior, but I guess I messed something up with some backwards compatibility logic I had from before we had a list of textModels and it was just a single object. I ended up removing that since it's not needed anymore