mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Return the visible history with "Remove last"
This commit is contained in:
parent
5a6e7057b9
commit
c4733000d7
@ -308,8 +308,8 @@ def generate_chat_reply_wrapper(text, state, regenerate=False, _continue=False):
|
||||
|
||||
def remove_last_message(history):
|
||||
if len(history['visible']) > 0 and history['internal'][-1][0] != '<|BEGIN-VISIBLE-CHAT|>':
|
||||
last = history['internal'].pop()
|
||||
history['visible'].pop()
|
||||
last = history['visible'].pop()
|
||||
history['internal'].pop()
|
||||
else:
|
||||
last = ['', '']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user