Skip to content

Make new browser reloads recognize current model (fixes #4843)#4865

Merged
oobabooga merged 1 commit into
oobabooga:devfrom
cyberfox:fix-model-forgetfulness
Dec 11, 2023
Merged

Make new browser reloads recognize current model (fixes #4843)#4865
oobabooga merged 1 commit into
oobabooga:devfrom
cyberfox:fix-model-forgetfulness

Conversation

@cyberfox
Copy link
Copy Markdown
Contributor

@cyberfox cyberfox commented Dec 9, 2023

This fixes a long-standing UI bug #4843 the simplest way possible.

Essentially instead of just giving the model name as the value, which then gets cached and not replaced...ever, we give a Callable that returns the current model name so each time it generates the UI for a 'new' browser session, it updates the model name to be whatever's current.

Before this change, the displayed name would always be the default after a reload or when hit by another browser. I ran into it most often when switching between iPhone and desktop. With this change it shows the latest model loaded. And yes, the pull request is a hundred times longer than the change, but it took me hours to get here. 🤣

Checklist:

@oobabooga
Copy link
Copy Markdown
Owner

That's a very clever solution. Well done.

@oobabooga oobabooga merged commit 602b8c6 into oobabooga:dev Dec 11, 2023
@cyberfox cyberfox deleted the fix-model-forgetfulness branch March 3, 2024 05:19
@djbritt
Copy link
Copy Markdown

djbritt commented Apr 6, 2024

Is this issue relevant to when I have a session going, and I reload the browser, I get this error

Could not find the character "[]" inside characters/. No character has been loaded - file File "/home/user1/git/oobabooga-4-1-24/modules/chat.py", line 673, in load_character

I am on ubuntu 22.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants