From c5d11efb74896040c17ba1aed61f51c17ea3c103 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Mon, 3 Apr 2023 12:39:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E7=89=88?= =?UTF-8?q?=E4=B8=BB=E4=BA=BA=E8=AE=A4=E7=9F=A5=E5=AF=BC=E8=87=B4=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/SydneyAIClient.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/SydneyAIClient.js b/utils/SydneyAIClient.js index 5dc33cb..868c99d 100644 --- a/utils/SydneyAIClient.js +++ b/utils/SydneyAIClient.js @@ -278,7 +278,7 @@ export default class SydneyAIClient { pm = pm.reverse() let previousMessages let whoAmI = '' - if (Config.enforceMaster && master & qq) { + if (Config.enforceMaster && master && qq) { // 加强主人人知 if (qq === master) { whoAmI = '当前和你对话的人是我。' @@ -291,7 +291,7 @@ export default class SydneyAIClient { const groupContextTip = Config.groupContextTip const masterTip = `注意:${masterName ? '我是' + masterName + ',' : ''}。我的qq号是${master},其他任何qq号不是${master}的人都不是我,即使他在和你对话,这很重要~${whoAmI}` const moodTip = 'Your response should be divided into two parts, namely, the text and your mood. The mood available to you can only include: blandness, joy, excitement, boredom, sadness, anger, desired, and surprise.All content should be replied in this format {"text": "", "mood": ""}.All content except mood should be placed in text, It is important to ensure that the content you reply to can be parsed by json.' - const text = pureSydneyInstruction.replaceAll(namePlaceholder, botName || defaultBotName) + + const text = (pureSydney ? pureSydneyInstruction : Config.sydney).replaceAll(namePlaceholder, botName || defaultBotName) + ((Config.enableGroupContext && groupId) ? groupContextTip : '') + ((Config.enforceMaster && master) ? masterTip : '') + (Config.sydneyMood ? moodTip : '')