fix: 修改必应绘图失败提示词避免ap画出来

This commit is contained in:
ikechan8370 2023-12-12 13:25:45 +08:00
parent fd0d0ff5db
commit e5d6a415e8
3 changed files with 6 additions and 6 deletions

View file

@ -1752,7 +1752,7 @@ export class chatgpt extends plugin {
await client.getImages(response.details.imageTag, e)
} catch (err) {
await redis.del(`CHATGPT:DRAW:${e.sender.user_id}`)
await e.reply('绘图失败:' + err)
await e.reply('绘图失败:' + err)
}
}
}

View file

@ -277,7 +277,7 @@ export class dalle extends plugin {
await client.getImages(prompt, e)
} catch (err) {
await redis.del(`CHATGPT:DRAW:${e.sender.user_id}`)
await e.reply('绘图失败:' + err)
await e.reply('绘图失败:' + err)
}
}
}

View file

@ -95,7 +95,7 @@ export default class BingDrawClient {
let pollingUrl = `${this.opts.baseUrl}/images/create/async/results/${requestId}?q=${urlEncodedPrompt}`
logger.info({ pollingUrl })
logger.info('waiting for bing draw results...')
let timeoutTimes = 30
let timeoutTimes = 50
let found = false
let timer = setInterval(async () => {
if (found) {
@ -124,7 +124,7 @@ export default class BingDrawClient {
]
for (let imageLink of imageLinks) {
if (badImages.indexOf(imageLink) > -1) {
await e.reply('绘图失败Bad images', true)
await e.reply('绘图失败Bad images', true)
logger.error(rText)
}
}
@ -135,7 +135,7 @@ export default class BingDrawClient {
clearInterval(timer)
} else {
if (timeoutTimes === 0) {
await e.reply('绘图超时', true)
await e.reply('绘图超时', true)
clearInterval(timer)
timer = null
} else {
@ -143,6 +143,6 @@ export default class BingDrawClient {
timeoutTimes--
}
}
}, 2000)
}, 3000)
}
}