wechaty-web-panel 1.6.10 → 1.6.11
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/CHANGELOG.md +3 -0
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/src/proxy/bot/chatgpt-web.js +1 -1
- package/dist/cjs/src/proxy/bot/chatgpt.js +1 -1
- package/dist/cjs/src/proxy/bot/dify.js +1 -1
- package/dist/cjs/src/proxy/mqtt.js +2 -0
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/src/proxy/bot/chatgpt-web.js +1 -1
- package/dist/esm/src/proxy/bot/chatgpt.js +1 -1
- package/dist/esm/src/proxy/bot/dify.js +1 -1
- package/dist/esm/src/proxy/mqtt.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -34,7 +34,7 @@ async function getChatGPTWebReply(content, uid, adminId, config = { token: "", d
|
|
|
34
34
|
let systemMessage = '';
|
|
35
35
|
if (config.keywordSystemMessages && config.keywordSystemMessages.length) {
|
|
36
36
|
const finalSystemMsg = config.keywordSystemMessages.find(item => content.startsWith(item.keyword));
|
|
37
|
-
if (finalSystemMsg) {
|
|
37
|
+
if (finalSystemMsg && finalSystemMsg.promotId) {
|
|
38
38
|
const promotInfo = await (0, aibotk_js_1.getPromotInfo)(finalSystemMsg.promotId);
|
|
39
39
|
console.log(`触发关键词角色功能,使用对应预设角色:${promotInfo.name}`);
|
|
40
40
|
systemMessage = promotInfo.promot;
|
|
@@ -34,7 +34,7 @@ async function getChatGPTReply(content, uid, adminId, config = { token: "", debu
|
|
|
34
34
|
let systemMessage = '';
|
|
35
35
|
if (config.keywordSystemMessages && config.keywordSystemMessages.length) {
|
|
36
36
|
const finalSystemMsg = config.keywordSystemMessages.find(item => content.startsWith(item.keyword));
|
|
37
|
-
if (finalSystemMsg) {
|
|
37
|
+
if (finalSystemMsg && finalSystemMsg.promotId) {
|
|
38
38
|
const promotInfo = await (0, aibotk_js_1.getPromotInfo)(finalSystemMsg.promotId);
|
|
39
39
|
console.log(`触发关键词角色功能,使用对应预设角色:${promotInfo.name}`);
|
|
40
40
|
systemMessage = promotInfo.promot;
|
|
@@ -34,7 +34,7 @@ async function getDifyAiReply(content, uid, adminId, config = { token: "", debug
|
|
|
34
34
|
let systemMessage = '';
|
|
35
35
|
if (config.keywordSystemMessages && config.keywordSystemMessages.length) {
|
|
36
36
|
const finalSystemMsg = config.keywordSystemMessages.find(item => content.startsWith(item.keyword));
|
|
37
|
-
if (finalSystemMsg) {
|
|
37
|
+
if (finalSystemMsg && finalSystemMsg.promotId) {
|
|
38
38
|
const promotInfo = await (0, aibotk_js_1.getPromotInfo)(finalSystemMsg.promotId);
|
|
39
39
|
console.log(`触发关键词角色功能,使用对应预设角色:${promotInfo.name}`);
|
|
40
40
|
systemMessage = promotInfo.promot;
|
|
@@ -33,6 +33,7 @@ const index_js_2 = require("../task/index.js");
|
|
|
33
33
|
const index_js_3 = require("../lib/index.js");
|
|
34
34
|
const chatgpt_js_1 = require("./bot/chatgpt.js");
|
|
35
35
|
const chatgpt_web_js_1 = require("./bot/chatgpt-web.js");
|
|
36
|
+
const dify_js_1 = require("./bot/dify.js");
|
|
36
37
|
let mqttclient = null;
|
|
37
38
|
async function initMqtt(that) {
|
|
38
39
|
try {
|
|
@@ -117,6 +118,7 @@ async function initMqtt(that) {
|
|
|
117
118
|
console.log('更新gpt配置');
|
|
118
119
|
(0, chatgpt_js_1.reset)(content.updateId);
|
|
119
120
|
(0, chatgpt_web_js_1.reset)(content.updateId);
|
|
121
|
+
(0, dify_js_1.reset)(content.updateId);
|
|
120
122
|
}
|
|
121
123
|
}
|
|
122
124
|
});
|
|
@@ -26,7 +26,7 @@ export async function getChatGPTWebReply(content, uid, adminId, config = { token
|
|
|
26
26
|
let systemMessage = '';
|
|
27
27
|
if (config.keywordSystemMessages && config.keywordSystemMessages.length) {
|
|
28
28
|
const finalSystemMsg = config.keywordSystemMessages.find(item => content.startsWith(item.keyword));
|
|
29
|
-
if (finalSystemMsg) {
|
|
29
|
+
if (finalSystemMsg && finalSystemMsg.promotId) {
|
|
30
30
|
const promotInfo = await getPromotInfo(finalSystemMsg.promotId);
|
|
31
31
|
console.log(`触发关键词角色功能,使用对应预设角色:${promotInfo.name}`);
|
|
32
32
|
systemMessage = promotInfo.promot;
|
|
@@ -26,7 +26,7 @@ export async function getChatGPTReply(content, uid, adminId, config = { token: "
|
|
|
26
26
|
let systemMessage = '';
|
|
27
27
|
if (config.keywordSystemMessages && config.keywordSystemMessages.length) {
|
|
28
28
|
const finalSystemMsg = config.keywordSystemMessages.find(item => content.startsWith(item.keyword));
|
|
29
|
-
if (finalSystemMsg) {
|
|
29
|
+
if (finalSystemMsg && finalSystemMsg.promotId) {
|
|
30
30
|
const promotInfo = await getPromotInfo(finalSystemMsg.promotId);
|
|
31
31
|
console.log(`触发关键词角色功能,使用对应预设角色:${promotInfo.name}`);
|
|
32
32
|
systemMessage = promotInfo.promot;
|
|
@@ -26,7 +26,7 @@ export async function getDifyAiReply(content, uid, adminId, config = { token: ""
|
|
|
26
26
|
let systemMessage = '';
|
|
27
27
|
if (config.keywordSystemMessages && config.keywordSystemMessages.length) {
|
|
28
28
|
const finalSystemMsg = config.keywordSystemMessages.find(item => content.startsWith(item.keyword));
|
|
29
|
-
if (finalSystemMsg) {
|
|
29
|
+
if (finalSystemMsg && finalSystemMsg.promotId) {
|
|
30
30
|
const promotInfo = await getPromotInfo(finalSystemMsg.promotId);
|
|
31
31
|
console.log(`触发关键词角色功能,使用对应预设角色:${promotInfo.name}`);
|
|
32
32
|
systemMessage = promotInfo.promot;
|
|
@@ -7,6 +7,7 @@ import { sendTaskMessage } from "../task/index.js";
|
|
|
7
7
|
import { randomRange } from '../lib/index.js';
|
|
8
8
|
import { reset } from './bot/chatgpt.js';
|
|
9
9
|
import { reset as webReset } from './bot/chatgpt-web.js';
|
|
10
|
+
import { reset as difyReset } from './bot/dify.js';
|
|
10
11
|
let mqttclient = null;
|
|
11
12
|
async function initMqtt(that) {
|
|
12
13
|
try {
|
|
@@ -91,6 +92,7 @@ async function initMqtt(that) {
|
|
|
91
92
|
console.log('更新gpt配置');
|
|
92
93
|
reset(content.updateId);
|
|
93
94
|
webReset(content.updateId);
|
|
95
|
+
difyReset(content.updateId);
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
});
|