From 742d0f0ea9185d4fbc310e747678b30d8d58f0af Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Thu, 29 Aug 2024 18:32:58 +0800 Subject: [PATCH] re-generate for conversation (#2165) ### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/apps/conversation_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/apps/conversation_app.py b/api/apps/conversation_app.py index 6ff490b77..bc4ec1633 100644 --- a/api/apps/conversation_app.py +++ b/api/apps/conversation_app.py @@ -125,7 +125,7 @@ def completion(): e, conv = ConversationService.get_by_id(req["conversation_id"]) if not e: return get_data_error_result(retmsg="Conversation not found!") - conv.message.append(deepcopy(msg[-1])) + conv.message = deepcopy(req["messages"]) e, dia = DialogService.get_by_id(conv.dialog_id) if not e: return get_data_error_result(retmsg="Dialog not found!")