mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +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):
|
def remove_last_message(history):
|
||||||
if len(history['visible']) > 0 and history['internal'][-1][0] != '<|BEGIN-VISIBLE-CHAT|>':
|
if len(history['visible']) > 0 and history['internal'][-1][0] != '<|BEGIN-VISIBLE-CHAT|>':
|
||||||
last = history['internal'].pop()
|
last = history['visible'].pop()
|
||||||
history['visible'].pop()
|
history['internal'].pop()
|
||||||
else:
|
else:
|
||||||
last = ['', '']
|
last = ['', '']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user