in deepseek_vl2/serve/app_modules/gradio_utils.py [0:0]
def delete_last_conversation(chatbot, history):
if len(history) % 2 != 0:
gr.Error("history length is not even")
return (
chatbot,
history,
"Delete Done",
)
if len(chatbot) > 0:
chatbot.pop()
if len(history) > 0 and len(history) % 2 == 0:
history.pop()
history.pop()
return (
chatbot,
history,
"Delete Done",
)