wechaty-web-panel 1.6.97 → 1.6.99
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/dist/cjs/src/bot/fastgpt/index.js +1 -0
- package/dist/cjs/src/botInstance/officialOpenAi.js +0 -5
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/src/proxy/bot/chatgpt.d.ts +2 -2
- package/dist/cjs/src/proxy/bot/chatgpt.js +1 -1
- package/dist/cjs/src/service/event-dispatch-service.js +1 -1
- package/dist/esm/src/bot/fastgpt/index.js +1 -0
- package/dist/esm/src/botInstance/officialOpenAi.js +0 -5
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/src/proxy/bot/chatgpt.d.ts +2 -2
- package/dist/esm/src/proxy/bot/chatgpt.js +1 -1
- package/dist/esm/src/service/event-dispatch-service.js +1 -1
- package/package.json +1 -1
- package/src/bot/fastgpt/index.js +1 -0
- package/src/botInstance/officialOpenAi.js +0 -6
- package/src/package-json.js +1 -1
- package/src/proxy/bot/chatgpt.js +1 -1
- package/src/service/event-dispatch-service.js +1 -1
|
@@ -123,11 +123,6 @@ class OfficialOpenAi {
|
|
|
123
123
|
return [{ type: 1, content: '上下文已重置' }];
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
if (isFastGPT && !this.chatOption[uid]) {
|
|
127
|
-
this.chatOption[uid] = {
|
|
128
|
-
chatId: (0, uuid_1.v4)()
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
126
|
const sendParams = { ...this.chatOption[uid], timeoutMs: this.config.timeoutMs * 1000 || 80 * 1000 };
|
|
132
127
|
if (systemMessage) {
|
|
133
128
|
sendParams.systemMessage = systemMessage;
|
|
@@ -4,7 +4,7 @@ export function getChatGPTReply({ content, variables, file }: {
|
|
|
4
4
|
content: any;
|
|
5
5
|
variables: any;
|
|
6
6
|
file: any;
|
|
7
|
-
}, uid: any, adminId: any, config
|
|
7
|
+
}, uid: any, adminId: any, config?: {
|
|
8
8
|
token: string;
|
|
9
9
|
debug: boolean;
|
|
10
10
|
proxyPass: string;
|
|
@@ -14,5 +14,5 @@ export function getChatGPTReply({ content, variables, file }: {
|
|
|
14
14
|
model: string;
|
|
15
15
|
systemMessage: string;
|
|
16
16
|
keywordSystemMessages: never[];
|
|
17
|
-
}
|
|
17
|
+
}): Promise<any>;
|
|
18
18
|
//# sourceMappingURL=chatgpt.d.ts.map
|
|
@@ -23,7 +23,7 @@ function resetAll() {
|
|
|
23
23
|
});
|
|
24
24
|
chatGPT = {};
|
|
25
25
|
}
|
|
26
|
-
async function getChatGPTReply({ content, variables, file }, uid, adminId, config = { token: "", debug: false, proxyPass: "", proxyUrl: "", showQuestion: false, timeoutMs: 80, model: "", systemMessage: "", keywordSystemMessages: [] }
|
|
26
|
+
async function getChatGPTReply({ content, variables, file }, uid, adminId, config = { token: "", debug: false, proxyPass: "", proxyUrl: "", showQuestion: false, timeoutMs: 80, model: "", systemMessage: "", keywordSystemMessages: [] }) {
|
|
27
27
|
if (!config.token) {
|
|
28
28
|
console.log('请到智能微秘书平台配置Openai apikey参数方可使用');
|
|
29
29
|
return [{ type: 1, content: '请到平台配置Openai apikey参数方可使用' }];
|
|
@@ -280,7 +280,7 @@ async function dispatchSummerBot({ content, id, uid, uname, roomId, roomName, us
|
|
|
280
280
|
break;
|
|
281
281
|
case 11:
|
|
282
282
|
// coze
|
|
283
|
-
res = await (0, cozeAi_js_1.getCozeSimpleReply)({ content, uid: id, config
|
|
283
|
+
res = await (0, cozeAi_js_1.getCozeSimpleReply)({ content, uid: id, config });
|
|
284
284
|
replys = res;
|
|
285
285
|
break;
|
|
286
286
|
case 12:
|
|
@@ -118,11 +118,6 @@ class OfficialOpenAi {
|
|
|
118
118
|
return [{ type: 1, content: '上下文已重置' }];
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
if (isFastGPT && !this.chatOption[uid]) {
|
|
122
|
-
this.chatOption[uid] = {
|
|
123
|
-
chatId: uuidv4()
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
121
|
const sendParams = { ...this.chatOption[uid], timeoutMs: this.config.timeoutMs * 1000 || 80 * 1000 };
|
|
127
122
|
if (systemMessage) {
|
|
128
123
|
sendParams.systemMessage = systemMessage;
|
|
@@ -4,7 +4,7 @@ export function getChatGPTReply({ content, variables, file }: {
|
|
|
4
4
|
content: any;
|
|
5
5
|
variables: any;
|
|
6
6
|
file: any;
|
|
7
|
-
}, uid: any, adminId: any, config
|
|
7
|
+
}, uid: any, adminId: any, config?: {
|
|
8
8
|
token: string;
|
|
9
9
|
debug: boolean;
|
|
10
10
|
proxyPass: string;
|
|
@@ -14,5 +14,5 @@ export function getChatGPTReply({ content, variables, file }: {
|
|
|
14
14
|
model: string;
|
|
15
15
|
systemMessage: string;
|
|
16
16
|
keywordSystemMessages: never[];
|
|
17
|
-
}
|
|
17
|
+
}): Promise<any>;
|
|
18
18
|
//# sourceMappingURL=chatgpt.d.ts.map
|
|
@@ -15,7 +15,7 @@ export function resetAll() {
|
|
|
15
15
|
});
|
|
16
16
|
chatGPT = {};
|
|
17
17
|
}
|
|
18
|
-
export async function getChatGPTReply({ content, variables, file }, uid, adminId, config = { token: "", debug: false, proxyPass: "", proxyUrl: "", showQuestion: false, timeoutMs: 80, model: "", systemMessage: "", keywordSystemMessages: [] }
|
|
18
|
+
export async function getChatGPTReply({ content, variables, file }, uid, adminId, config = { token: "", debug: false, proxyPass: "", proxyUrl: "", showQuestion: false, timeoutMs: 80, model: "", systemMessage: "", keywordSystemMessages: [] }) {
|
|
19
19
|
if (!config.token) {
|
|
20
20
|
console.log('请到智能微秘书平台配置Openai apikey参数方可使用');
|
|
21
21
|
return [{ type: 1, content: '请到平台配置Openai apikey参数方可使用' }];
|
|
@@ -275,7 +275,7 @@ async function dispatchSummerBot({ content, id, uid, uname, roomId, roomName, us
|
|
|
275
275
|
break;
|
|
276
276
|
case 11:
|
|
277
277
|
// coze
|
|
278
|
-
res = await getCozeSimpleReply({ content, uid: id, config
|
|
278
|
+
res = await getCozeSimpleReply({ content, uid: id, config });
|
|
279
279
|
replys = res;
|
|
280
280
|
break;
|
|
281
281
|
case 12:
|
package/package.json
CHANGED
package/src/bot/fastgpt/index.js
CHANGED
|
@@ -126,12 +126,6 @@ class OfficialOpenAi {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
if(isFastGPT && !this.chatOption[uid]) {
|
|
130
|
-
this.chatOption[uid] = {
|
|
131
|
-
chatId: uuidv4()
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
129
|
|
|
136
130
|
const sendParams = { ...this.chatOption[uid], timeoutMs: this.config.timeoutMs * 1000 || 80 * 1000 }
|
|
137
131
|
if(systemMessage) {
|
package/src/package-json.js
CHANGED
package/src/proxy/bot/chatgpt.js
CHANGED
|
@@ -17,7 +17,7 @@ export function resetAll() {
|
|
|
17
17
|
})
|
|
18
18
|
chatGPT = {}
|
|
19
19
|
}
|
|
20
|
-
export async function getChatGPTReply({ content, variables, file }, uid, adminId, config = { token: "", debug: false, proxyPass: "", proxyUrl: "", showQuestion: false, timeoutMs: 80, model: "", systemMessage: "", keywordSystemMessages: [] }
|
|
20
|
+
export async function getChatGPTReply({ content, variables, file }, uid, adminId, config = { token: "", debug: false, proxyPass: "", proxyUrl: "", showQuestion: false, timeoutMs: 80, model: "", systemMessage: "", keywordSystemMessages: [] }) {
|
|
21
21
|
if (!config.token) {
|
|
22
22
|
console.log('请到智能微秘书平台配置Openai apikey参数方可使用')
|
|
23
23
|
return [{ type: 1, content: '请到平台配置Openai apikey参数方可使用' }]
|
|
@@ -271,7 +271,7 @@ async function dispatchSummerBot({ content, id, uid, uname, roomId, roomName, us
|
|
|
271
271
|
break
|
|
272
272
|
case 11:
|
|
273
273
|
// coze
|
|
274
|
-
res = await getCozeSimpleReply({ content, uid: id, config
|
|
274
|
+
res = await getCozeSimpleReply({ content, uid: id, config })
|
|
275
275
|
replys = res
|
|
276
276
|
break
|
|
277
277
|
case 12:
|