wechaty-web-panel 1.2.8 → 1.2.9
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/package-json.js +1 -1
- package/dist/cjs/src/proxy/chatgpt.d.ts +2 -2
- package/dist/cjs/src/proxy/chatgpt.js +2 -2
- package/dist/cjs/src/service/event-dispatch-service.d.ts +1 -1
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/src/proxy/chatgpt.d.ts +2 -2
- package/dist/esm/src/proxy/chatgpt.js +2 -2
- package/dist/esm/src/service/event-dispatch-service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@ declare namespace _default {
|
|
|
2
2
|
export { geGPTReply };
|
|
3
3
|
}
|
|
4
4
|
export default _default;
|
|
5
|
-
export function geGPTReply(content: any): Promise<
|
|
5
|
+
export function geGPTReply(content: any): Promise<string[] | {
|
|
6
6
|
type: number;
|
|
7
7
|
content: string;
|
|
8
|
-
}[]
|
|
8
|
+
}[]>;
|
|
9
9
|
//# sourceMappingURL=chatgpt.d.ts.map
|
|
@@ -15,12 +15,12 @@ async function geGPTReply(content) {
|
|
|
15
15
|
}
|
|
16
16
|
const api = new chatgpt_1.ChatGPTAPI({ sessionToken: config.gpttoken });
|
|
17
17
|
await api.ensureAuth();
|
|
18
|
-
const threeMinutesMs =
|
|
18
|
+
const threeMinutesMs = 3 * 60 * 1000;
|
|
19
19
|
const response = await (0, p_timeout_1.default)(api.sendMessage(content), {
|
|
20
20
|
milliseconds: threeMinutesMs,
|
|
21
21
|
message: 'ChatGPT返回超时了,用的人太多,太火爆了,等会再试吧'
|
|
22
22
|
});
|
|
23
|
-
let replys = response
|
|
23
|
+
let replys = [response];
|
|
24
24
|
replys = replys.map(item => {
|
|
25
25
|
return {
|
|
26
26
|
type: 1,
|
|
@@ -20,5 +20,5 @@ export function dispatchEventContent(that: any, eName: string, msg: string, name
|
|
|
20
20
|
* @param {*} name 发消息人
|
|
21
21
|
* @param {*} id 发消息人id
|
|
22
22
|
*/
|
|
23
|
-
export function dispatchAiBot(bot: any, msg: any, name: any, id: any): Promise<any[] | "" |
|
|
23
|
+
export function dispatchAiBot(bot: any, msg: any, name: any, id: any): Promise<any[] | "" | undefined>;
|
|
24
24
|
//# sourceMappingURL=event-dispatch-service.d.ts.map
|
|
@@ -2,8 +2,8 @@ declare namespace _default {
|
|
|
2
2
|
export { geGPTReply };
|
|
3
3
|
}
|
|
4
4
|
export default _default;
|
|
5
|
-
export function geGPTReply(content: any): Promise<
|
|
5
|
+
export function geGPTReply(content: any): Promise<string[] | {
|
|
6
6
|
type: number;
|
|
7
7
|
content: string;
|
|
8
|
-
}[]
|
|
8
|
+
}[]>;
|
|
9
9
|
//# sourceMappingURL=chatgpt.d.ts.map
|
|
@@ -9,12 +9,12 @@ async function geGPTReply(content) {
|
|
|
9
9
|
}
|
|
10
10
|
const api = new ChatGPTAPI({ sessionToken: config.gpttoken });
|
|
11
11
|
await api.ensureAuth();
|
|
12
|
-
const threeMinutesMs =
|
|
12
|
+
const threeMinutesMs = 3 * 60 * 1000;
|
|
13
13
|
const response = await pTimeout(api.sendMessage(content), {
|
|
14
14
|
milliseconds: threeMinutesMs,
|
|
15
15
|
message: 'ChatGPT返回超时了,用的人太多,太火爆了,等会再试吧'
|
|
16
16
|
});
|
|
17
|
-
let replys = response
|
|
17
|
+
let replys = [response];
|
|
18
18
|
replys = replys.map(item => {
|
|
19
19
|
return {
|
|
20
20
|
type: 1,
|
|
@@ -20,5 +20,5 @@ export function dispatchEventContent(that: any, eName: string, msg: string, name
|
|
|
20
20
|
* @param {*} name 发消息人
|
|
21
21
|
* @param {*} id 发消息人id
|
|
22
22
|
*/
|
|
23
|
-
export function dispatchAiBot(bot: any, msg: any, name: any, id: any): Promise<any[] | "" |
|
|
23
|
+
export function dispatchAiBot(bot: any, msg: any, name: any, id: any): Promise<any[] | "" | undefined>;
|
|
24
24
|
//# sourceMappingURL=event-dispatch-service.d.ts.map
|