From 19ccb2aaf5a33cdfbfa43e06981b03c71fad479c Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 28 Feb 2023 01:05:43 -0300 Subject: [PATCH] Handle and --- modules/chat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/chat.py b/modules/chat.py index 78aeee06..ece8d1e5 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -332,6 +332,7 @@ def load_character(_character, name1, name2): context = f"{context.strip()}\n\n" if 'example_dialogue' in data and data['example_dialogue'] != '': data['example_dialogue'] = data['example_dialogue'].replace('{{user}}', name1).replace('{{char}}', name2) + data['example_dialogue'] = data['example_dialogue'].replace('', name1).replace('', name2) context += f"{data['example_dialogue'].strip()}\n" if 'char_greeting' in data and len(data['char_greeting'].strip()) > 0: shared.history['internal'] += [['<|BEGIN-VISIBLE-CHAT|>', data['char_greeting']]]