UI: smoother chat streaming

This removes the throttling associated to gr.Textbox that made words appears in chunks rather than one at a time
This commit is contained in:
oobabooga 2025-04-09 16:02:37 -07:00
parent 6ea0206207
commit 297a406e05
2 changed files with 8 additions and 6 deletions

View file

@ -391,8 +391,10 @@ def generate_chat_html(history, name1, name2, reset_cache=False):
def chat_html_wrapper(history, name1, name2, mode, style, character, reset_cache=False):
if mode == 'instruct':
return generate_instruct_html(history)
result = generate_instruct_html(history)
elif style == 'wpp':
return generate_chat_html(history, name1, name2)
result = generate_chat_html(history, name1, name2)
else:
return generate_cai_chat_html(history, name1, name2, style, character, reset_cache)
result = generate_cai_chat_html(history, name1, name2, style, character, reset_cache)
return {'html': result}