From df37ba5256d146085020b667ac2645406f74d0be Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 12 May 2023 12:59:48 -0300 Subject: [PATCH] Update impersonate_wrapper --- modules/chat.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/chat.py b/modules/chat.py index 5dbb517c..a142a3c9 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -247,10 +247,12 @@ def impersonate_wrapper(text, state): if next_character_found: break - if reply is not None: + if reply in [None, '']: + break + else: cumulative_reply = reply - yield reply + yield cumulative_reply def generate_chat_reply(text, state, regenerate=False, _continue=False):