From 0f0108ce342fca880de3f60e0244ba895ce8ba64 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 6 Jun 2023 07:00:11 -0300 Subject: [PATCH] Never load the history for default character --- modules/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chat.py b/modules/chat.py index 63042f1f..5ee5d9e1 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -564,7 +564,7 @@ def load_character(character, name1, name2, instruct=False): if not instruct: shared.history['internal'] = [] shared.history['visible'] = [] - if Path(f'logs/{shared.character}_persistent.json').exists(): + if shared.character != 'None' and Path(f'logs/{shared.character}_persistent.json').exists(): load_history(open(Path(f'logs/{shared.character}_persistent.json'), 'rb').read(), name1, name2) else: # Insert greeting if it exists