koishi-plugin-satori-ai 1.2.4 → 1.2.5
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/index.js +1 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1203,7 +1203,6 @@ ${history}
|
|
|
1203
1203
|
const userlevel = getFavorabilityLevel(user, this.getFavorabilityConfig());
|
|
1204
1204
|
const messages = this.buildMessage(userlevel, dialogues.join("\n"), existing);
|
|
1205
1205
|
logger5.info(`用户 ${user.userid} 画像生成中...`);
|
|
1206
|
-
logger5.info(`${messages[0].content}`);
|
|
1207
1206
|
try {
|
|
1208
1207
|
const response = await apiClient.generateUserPortrait(user, messages);
|
|
1209
1208
|
if (response && !response.error) {
|
|
@@ -1441,7 +1440,7 @@ var SAT = class extends Sat {
|
|
|
1441
1440
|
}
|
|
1442
1441
|
// 前置检查
|
|
1443
1442
|
performPreChecks(session, prompt) {
|
|
1444
|
-
if (prompt
|
|
1443
|
+
if (!prompt || prompt.length == 0)
|
|
1445
1444
|
return session.text("commands.sat.messages.no-prompt");
|
|
1446
1445
|
if (prompt.length > this.config.max_tokens)
|
|
1447
1446
|
return session.text("commands.sat.messages.tooLong");
|