Update only the last message during streaming + add back dynamic UI update speed (#7038)

This commit is contained in:
oobabooga 2025-06-02 09:50:17 -03:00 committed by GitHub
parent 45c9ae312c
commit bb409c926e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 181 additions and 156 deletions

View file

@ -6,6 +6,7 @@ import yaml
import extensions
from modules import shared
from modules.chat import load_history
with open(Path(__file__).resolve().parent / '../css/NotoSans/stylesheet.css', 'r') as f:
css = f.read()
@ -194,7 +195,6 @@ def list_interface_input_elements():
'max_new_tokens',
'prompt_lookup_num_tokens',
'max_tokens_second',
'max_updates_second',
'do_sample',
'dynamic_temperature',
'temperature_last',
@ -270,6 +270,10 @@ def gather_interface_values(*args):
if not shared.args.multi_user:
shared.persistent_interface_state = output
# Prevent history loss if backend is restarted but UI is not refreshed
if output['history'] is None and output['unique_id'] is not None:
output['history'] = load_history(output['unique_id'], output['character_menu'], output['mode'])
return output