koishi-plugin-satori-ai 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/gobang_ai.exe +0 -0
- package/lib/index.js +15 -15
- package/package.json +1 -1
|
Binary file
|
package/lib/index.js
CHANGED
|
@@ -1196,7 +1196,7 @@ var Sat = class extends import_koishi5.Service {
|
|
|
1196
1196
|
enable_gobang: import_koishi5.Schema.boolean().default(false).description("是否开启五子棋游戏"),
|
|
1197
1197
|
channel_id_for_gobang: import_koishi5.Schema.array(String).description("启用五子棋的游戏频道id(不建议太多,第一个会被公示)"),
|
|
1198
1198
|
enable_fencing: import_koishi5.Schema.boolean().default(false).description("是否开启击剑游戏")
|
|
1199
|
-
}).description("拓展模块-游戏设置(
|
|
1199
|
+
}).description("拓展模块-游戏设置(仅五子棋有效,其他无效,开发中)")
|
|
1200
1200
|
]);
|
|
1201
1201
|
})(Sat || (Sat = {}));
|
|
1202
1202
|
|
|
@@ -2490,19 +2490,20 @@ ${payload}`);
|
|
|
2490
2490
|
const userMemory = await this.memoryManager.searchMemories(session, prompt);
|
|
2491
2491
|
const user = await getUser(this.ctx, session.userId);
|
|
2492
2492
|
let systemPrompt = this.getThinkingPrompt(user, prompt);
|
|
2493
|
+
systemPrompt += "#以下要求仅对最终的回复内容生效,不限制思考过程\n";
|
|
2493
2494
|
systemPrompt += this.config.prompt;
|
|
2494
2495
|
if (user?.items?.["觉的衣柜"]?.count) {
|
|
2495
2496
|
const clothes = user?.items?.["觉的衣柜"]?.metadata?.clothes;
|
|
2496
2497
|
if (clothes)
|
|
2497
2498
|
systemPrompt += `
|
|
2498
|
-
|
|
2499
|
+
##你当前的穿着(根据穿着进行对应的行为):${clothes}
|
|
2499
2500
|
`;
|
|
2500
2501
|
}
|
|
2501
|
-
systemPrompt += commonSense;
|
|
2502
|
-
systemPrompt += channelDialogue;
|
|
2503
|
-
systemPrompt += userMemory;
|
|
2504
|
-
systemPrompt += this.portraitManager.getUserPortrait(session);
|
|
2505
|
-
systemPrompt +=
|
|
2502
|
+
systemPrompt += "##" + commonSense;
|
|
2503
|
+
systemPrompt += "##" + channelDialogue;
|
|
2504
|
+
systemPrompt += "##" + userMemory;
|
|
2505
|
+
systemPrompt += "##" + this.portraitManager.getUserPortrait(session);
|
|
2506
|
+
systemPrompt += `##用户的名字是:${session.username}, id是:${session.userId}`;
|
|
2506
2507
|
const nickName = user.items["情侣合照"]?.metadata?.userNickName;
|
|
2507
2508
|
if (nickName)
|
|
2508
2509
|
systemPrompt += `, 昵称是:${nickName},称呼用户时请优先使用昵称`;
|
|
@@ -2511,28 +2512,27 @@ ${payload}`);
|
|
|
2511
2512
|
if (this.config.enable_mood) {
|
|
2512
2513
|
const moodLevel = this.moodManager.getMoodLevel(user.userid);
|
|
2513
2514
|
if (moodLevel == "normal" || favorabilityLevel == "厌恶")
|
|
2514
|
-
systemPrompt += generateLevelPrompt(favorabilityLevel, this.getFavorabilityConfig(), user);
|
|
2515
|
+
systemPrompt += "##" + generateLevelPrompt(favorabilityLevel, this.getFavorabilityConfig(), user);
|
|
2515
2516
|
const moodPrompt = this.moodManager.generateMoodPrompt(user.userid);
|
|
2516
2517
|
systemPrompt += `
|
|
2517
|
-
|
|
2518
|
+
##${moodPrompt}
|
|
2518
2519
|
`;
|
|
2519
2520
|
} else {
|
|
2520
|
-
systemPrompt += generateLevelPrompt(favorabilityLevel, this.getFavorabilityConfig(), user);
|
|
2521
|
+
systemPrompt += "##" + generateLevelPrompt(favorabilityLevel, this.getFavorabilityConfig(), user);
|
|
2521
2522
|
}
|
|
2522
2523
|
}
|
|
2523
2524
|
systemPrompt += `#注意:你最终的回复内容必须使用“<answer>”开头,使用“</answer>”结尾
|
|
2524
2525
|
`;
|
|
2525
2526
|
if (this.config.no_system_prompt)
|
|
2526
|
-
systemPrompt += "
|
|
2527
|
+
systemPrompt += "#如果你明白以上内容,请回复“<answer>已明确对话要求</answer>”";
|
|
2527
2528
|
return systemPrompt;
|
|
2528
2529
|
}
|
|
2529
2530
|
// 思考提示
|
|
2530
2531
|
getThinkingPrompt(user, prompt) {
|
|
2531
2532
|
const reasonerPrompt = this.config.reasoner_prompt;
|
|
2532
|
-
const promptForNoReasoner =
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
#注意:你的回复内容必须使用“<answer>”开头,使用“</answer>”结尾
|
|
2533
|
+
const promptForNoReasoner = `#请你在回复时先进行分析思考,并且模仿思维链的模式输出思考内容,${reasonerPrompt};
|
|
2534
|
+
#你在思考时必须以 "嗯" 开头。仔细揣摩用户意图,完整输出思考内容后在输出正式的回复内容;
|
|
2535
|
+
#注意:你的正式回复内容必须使用“<answer>”开头,使用“</answer>”结尾
|
|
2536
2536
|
`;
|
|
2537
2537
|
const promptForReasoner = `#你在思考时必须以 "嗯" 开头。仔细揣摩用户意图,思考结束后返回符合要求的回复。
|
|
2538
2538
|
#注意:你的回复内容必须使用“<answer>”开头,使用“</answer>”结尾
|