From 7bbe32f618e3d3118437008aed7caed2d001743b Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 2 Mar 2023 00:48:46 -0300 Subject: [PATCH] Don't return a value in an iterator function --- modules/text_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/text_generation.py b/modules/text_generation.py index 3aabca96..8f8212fb 100644 --- a/modules/text_generation.py +++ b/modules/text_generation.py @@ -92,7 +92,7 @@ def generate_reply(question, max_new_tokens, do_sample, temperature, top_p, typi reply = shared.model.generate(question, token_count=8, temperature=temperature, top_p=top_p) yield formatted_outputs(reply, shared.model_name) question = reply - return formatted_outputs(reply, shared.model_name) + return original_question = question if not (shared.args.chat or shared.args.cai_chat):