From 373555c4fb7bb5794a858bc4b8e2af1ea7b0d2cf Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 3 Jul 2023 22:19:28 -0700 Subject: [PATCH] Fix loading some histories (thanks kaiokendev) --- modules/chat.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/chat.py b/modules/chat.py index f21b51c6..c08f3f3f 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -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 != "":