소스 검색

Fix bug in "remove last" button

oobabooga 3 년 전
부모
커밋
c5cc3a3075
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      server.py

+ 3 - 2
server.py

@@ -334,10 +334,11 @@ if args.chat or args.cai_chat:
 
     def remove_last_message(name1, name2):
         history.pop()
+        _history = remove_example_dialogue_from_history(history)
         if args.cai_chat:
-            return generate_chat_html(history, name1, name2, character)
+            return generate_chat_html(_history, name1, name2, character)
         else:
-            return history
+            return _history
 
     def clear():
         global history