Merge pull request #1208 from Rail1bc/fix_begin_dialogs

fix:使 begin_dialogs ,预设对话,不会多次插入
This commit is contained in:
Soulter
2025-04-10 15:32:10 +08:00
committed by GitHub
+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: