mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30:20 +01: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):
|
def load_persistent_history(state):
|
||||||
if shared.args.multi_user or state['mode'] == 'instruct':
|
if state['mode'] == 'instruct':
|
||||||
return state['history']
|
return state['history']
|
||||||
|
|
||||||
character = state['character_menu']
|
character = state['character_menu']
|
||||||
greeting = state['greeting']
|
greeting = state['greeting']
|
||||||
p = Path(f'logs/{character}_persistent.json')
|
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())
|
f = json.loads(open(p, 'rb').read())
|
||||||
if 'internal' in f and 'visible' in f:
|
if 'internal' in f and 'visible' in f:
|
||||||
history = f
|
history = f
|
||||||
|
Loading…
Reference in New Issue
Block a user