diff --git a/modules/chat.py b/modules/chat.py index 8db7953a..55984d7a 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -880,7 +880,9 @@ def chatbot_wrapper(text, state, regenerate=False, _continue=False, loading_mess # Extract the reply if state['mode'] in ['chat', 'chat-instruct']: - reply = reply.lstrip() + if not _continue: + reply = reply.lstrip() + if reply.startswith(state['name2'] + ':'): reply = reply[len(state['name2'] + ':'):] elif reply.startswith(state['name1'] + ':'):