fix:使 begin_dialogs ,预设对话,不会多次插入

This commit is contained in:
Raila23
2025-04-10 09:18:58 +08:00
parent f2cc4311c5
commit 95b08b2023
+1 -1
View File
@@ -1232,7 +1232,7 @@ UID: {user_id} 此 ID 可用于设置管理员。
if mood_dialogs := persona["_mood_imitation_dialogs_processed"]:
req.system_prompt += "\nHere are few shots of dialogs, you need to imitate the tone of 'B' in the following dialogs to respond:\n"
req.system_prompt += mood_dialogs
if begin_dialogs := persona["_begin_dialogs_processed"]:
if (begin_dialogs := persona["_begin_dialogs_processed"]) and not req.contexts:
req.contexts[:0] = begin_dialogs
if quote and quote.message_str: