mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: 智能模式function叠加消息
This commit is contained in:
parent
b5669de782
commit
a1b450abaa
1 changed files with 4 additions and 1 deletions
|
|
@ -1875,7 +1875,7 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
this.chatGPTApi = new ChatGPTAPI(opts)
|
||||
let option = {
|
||||
timeoutMs: 120000,
|
||||
timeoutMs: 600000,
|
||||
completionParams,
|
||||
stream: true,
|
||||
onProgress: (data) => {
|
||||
|
|
@ -2034,6 +2034,9 @@ export class chatgpt extends plugin {
|
|||
msg = await this.chatGPTApi.sendMessage(prompt, option)
|
||||
logger.info(msg)
|
||||
while (msg.functionCall) {
|
||||
if (msg.text) {
|
||||
await e.reply(msg.text)
|
||||
}
|
||||
let { name, arguments: args } = msg.functionCall
|
||||
args = JSON.parse(args)
|
||||
// 感觉换成targetGroupIdOrUserQQNumber这种表意比较清楚的变量名,效果会好一丢丢
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue