From e2da6b9685a40825fa9c299d676aaae1c3d21dcc Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 12 Mar 2023 03:25:56 -0300 Subject: [PATCH] Fix You You You appearing in chat mode --- modules/chat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/chat.py b/modules/chat.py index 5bf96b1a..a6167d35 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -84,6 +84,7 @@ def extract_message_from_reply(question, reply, name1, name2, check, impersonate tmp = f"\n{asker}:" for j in range(1, len(tmp)): if reply[-j:] == tmp[:j]: + reply = reply[:-j] substring_found = True return reply, next_character_found, substring_found