mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-06-09 07:07:16 -04:00
Don't replace last reply with an empty message
This commit is contained in:
parent
0789554f65
commit
8dbaa20ca8
1 changed files with 4 additions and 1 deletions
|
@ -347,7 +347,10 @@ def send_last_reply_to_input(history):
|
|||
|
||||
def replace_last_reply(text, state):
|
||||
history = state['history']
|
||||
if len(history['visible']) > 0:
|
||||
|
||||
if len(text.strip()) == 0:
|
||||
return history
|
||||
elif len(history['visible']) > 0:
|
||||
history['visible'][-1][1] = text
|
||||
history['internal'][-1][1] = apply_extensions('input', text, state)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue