From 6350128247171239380f63d188d5c170fb6d3317 Mon Sep 17 00:00:00 2001 From: parveen kumar Date: Mon, 13 May 2024 15:44:07 +0530 Subject: [PATCH] feat: streaming --- webui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webui.py b/webui.py index e2d403f..6c88c56 100644 --- a/webui.py +++ b/webui.py @@ -203,11 +203,11 @@ def loadModelFromChatTab(repo_id): def bot(history): print("Question: ", history[-1][0]) - output = llm_chain.invoke({"question": history[-1][0]}) + output = llm_chain.stream(history[-1][0]) print("stream:", output) history[-1][1] = "" for character in output: - print(character) + # print(character) history[-1][1] += character yield history