Sfoglia il codice sorgente

Fix You You You appearing in chat mode

oobabooga 2 anni fa
parent
commit
e2da6b9685
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      modules/chat.py

+ 1 - 0
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