瀏覽代碼

Prevent streaming with no_stream + generation attempts > 1

oobabooga 2 年之前
父節點
當前提交
9456c1d6ed
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/chat.py

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