Skip to content

Commit

Permalink
feat: streaming (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
parveen232 authored May 13, 2024
1 parent f24fbc1 commit f8d9506
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f8d9506

Please sign in to comment.