From 9456c1d6ed62c0b928ce54c60e03c63df929e53f Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 25 Feb 2023 17:45:03 -0300 Subject: [PATCH] Prevent streaming with no_stream + generation attempts > 1 --- modules/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chat.py b/modules/chat.py index ad373c2..8bc42dd 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -135,7 +135,7 @@ def chatbot_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typical shared.history['internal'][-1] = [text, reply] shared.history['visible'][-1] = [visible_text, visible_reply] - if not substring_found: + if not substring_found and not shared.args.no_stream: yield shared.history['visible'] if next_character_found: break