mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 17:29:22 +01:00
Don't replace last reply with an empty message
This commit is contained in:
parent
0789554f65
commit
8dbaa20ca8
@ -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…
Reference in New Issue
Block a user