From c855b828fe48902f72985602bf2c0967a6a298c9 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 5 Mar 2023 17:01:47 -0300 Subject: [PATCH] Better handle --- modules/chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/chat.py b/modules/chat.py index 8e64612e..f40f8299 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -127,8 +127,8 @@ def chatbot_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typical # Extracting the reply reply, next_character_found, substring_found = extract_message_from_reply(prompt, reply, name1, name2, check) - reply = re.sub("(||{{user}})", name1_original, reply) - visible_reply = apply_extensions(reply, "output") + visible_reply = re.sub("(||{{user}})", name1_original, reply) + visible_reply = apply_extensions(visible_reply, "output") if shared.args.chat: visible_reply = visible_reply.replace('\n', '
')