Reload the default chat on page refresh
This commit is contained in:
parent
f1914115d3
commit
3b8cecbab7
2 changed files with 11 additions and 8 deletions
|
@ -300,6 +300,10 @@ def load_history(file, name1, name2):
|
|||
shared.history['internal'] = tokenize_dialogue(file, name1, name2)
|
||||
shared.history['visible'] = copy.deepcopy(shared.history['internal'])
|
||||
|
||||
def load_default_history(name1, name2):
|
||||
if Path(f'logs/persistent.json').exists():
|
||||
load_history(open(Path(f'logs/persistent.json'), 'rb').read(), name1, name2)
|
||||
|
||||
def load_character(_character, name1, name2):
|
||||
context = ""
|
||||
shared.history['internal'] = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue