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 CHANGED
@@ -1,5 +1,8 @@
1
1
  ## 更新日志
2
2
 
3
+ ### V1.6.11(2023-06-09)
4
+ 1、修复dify角色设置bug
5
+
3
6
  ### V1.6.10(2023-05-29)
4
7
  1、api添加wxid 字段
5
8
 
@@ -6,7 +6,7 @@ exports.packageJson = void 0;
6
6
  */
7
7
  exports.packageJson = {
8
8
  "name": "wechaty-web-panel",
9
- "version": "1.6.10",
9
+ "version": "1.6.11",
10
10
  "description": "智能微秘书插件",
11
11
  "exports": {
12
12
  ".": {
@@ -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
  });
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const packageJson = {
5
5
  "name": "wechaty-web-panel",
6
- "version": "1.6.10",
6
+ "version": "1.6.11",
7
7
  "description": "智能微秘书插件",
8
8
  "exports": {
9
9
  ".": {
@@ -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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wechaty-web-panel",
3
- "version": "1.6.10",
3
+ "version": "1.6.11",
4
4
  "description": "智能微秘书插件",
5
5
  "exports": {
6
6
  ".": {