Add a comment

This commit is contained in:
oobabooga 2025-06-01 19:44:43 -07:00
parent 18c0eb7e38
commit 683e02f33d

View file

@ -827,7 +827,7 @@ def generate_chat_reply_wrapper(text, state, regenerate=False, _continue=False):
for i, history in enumerate(generate_chat_reply(text, state, regenerate, _continue, loading_message=True, for_ui=True)):
yield chat_html_wrapper(history, state['name1'], state['name2'], state['mode'], state['chat_style'], state['character_menu'], last_message_only=(i > 0)), history
if i == 0:
time.sleep(0.05)
time.sleep(0.05) # We need this to make sure the first update goes through
current_time = time.monotonic()
# Save on first iteration or if save_interval seconds have passed