mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Make greetings appear in --multi-user mode
This commit is contained in:
parent
4b1804a438
commit
7e8340b14d
@ -394,13 +394,13 @@ def save_persistent_history(history, character, mode):
|
||||
|
||||
|
||||
def load_persistent_history(state):
|
||||
if shared.args.multi_user or state['mode'] == 'instruct':
|
||||
if state['mode'] == 'instruct':
|
||||
return state['history']
|
||||
|
||||
character = state['character_menu']
|
||||
greeting = state['greeting']
|
||||
p = Path(f'logs/{character}_persistent.json')
|
||||
if character not in ['None', '', None] and p.exists():
|
||||
if not shared.args.multi_user and character not in ['None', '', None] and p.exists():
|
||||
f = json.loads(open(p, 'rb').read())
|
||||
if 'internal' in f and 'visible' in f:
|
||||
history = f
|
||||
|
Loading…
Reference in New Issue
Block a user