Skip to content

Commit 4749159

Browse files
committed
fix(conversation): retain existing persona_id when updating conversation
1 parent 5530a22 commit 4749159

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

astrbot/dashboard/routes/conversation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ async def upd_conv(self):
148148
user_id = data.get("user_id")
149149
cid = data.get("cid")
150150
title = data.get("title")
151-
persona_id = data.get("persona_id", "")
152151

153152
if not user_id or not cid:
154153
return Response().error("缺少必要参数: user_id 和 cid").__dict__
@@ -158,6 +157,9 @@ async def upd_conv(self):
158157
)
159158
if not conversation:
160159
return Response().error("对话不存在").__dict__
160+
161+
persona_id = data.get("persona_id", conversation.persona_id)
162+
161163
if title is not None or persona_id is not None:
162164
await self.conv_mgr.update_conversation(
163165
unified_msg_origin=user_id,

0 commit comments

Comments
 (0)