Fix loading some histories (thanks kaiokendev)

This commit is contained in:
oobabooga 2023-07-03 22:19:28 -07:00
parent 10c8c197bf
commit 373555c4fb

View File

@ -404,6 +404,10 @@ def load_persistent_history(state):
f = json.loads(open(p, 'rb').read())
if 'internal' in f and 'visible' in f:
history = f
else:
history = {'internal': [], 'visible': []}
history['internal'] = f['data']
history['visible'] = f['data_visible']
else:
history = {'internal': [], 'visible': []}
if greeting != "":