mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: 修改必应绘图失败提示词避免ap画出来
This commit is contained in:
parent
fd0d0ff5db
commit
e5d6a415e8
3 changed files with 6 additions and 6 deletions
|
|
@ -1752,7 +1752,7 @@ export class chatgpt extends plugin {
|
||||||
await client.getImages(response.details.imageTag, e)
|
await client.getImages(response.details.imageTag, e)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
await redis.del(`CHATGPT:DRAW:${e.sender.user_id}`)
|
await redis.del(`CHATGPT:DRAW:${e.sender.user_id}`)
|
||||||
await e.reply('绘图失败:' + err)
|
await e.reply('❌绘图失败:' + err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,7 @@ export class dalle extends plugin {
|
||||||
await client.getImages(prompt, e)
|
await client.getImages(prompt, e)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
await redis.del(`CHATGPT:DRAW:${e.sender.user_id}`)
|
await redis.del(`CHATGPT:DRAW:${e.sender.user_id}`)
|
||||||
await e.reply('绘图失败:' + err)
|
await e.reply('❌绘图失败:' + err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ export default class BingDrawClient {
|
||||||
let pollingUrl = `${this.opts.baseUrl}/images/create/async/results/${requestId}?q=${urlEncodedPrompt}`
|
let pollingUrl = `${this.opts.baseUrl}/images/create/async/results/${requestId}?q=${urlEncodedPrompt}`
|
||||||
logger.info({ pollingUrl })
|
logger.info({ pollingUrl })
|
||||||
logger.info('waiting for bing draw results...')
|
logger.info('waiting for bing draw results...')
|
||||||
let timeoutTimes = 30
|
let timeoutTimes = 50
|
||||||
let found = false
|
let found = false
|
||||||
let timer = setInterval(async () => {
|
let timer = setInterval(async () => {
|
||||||
if (found) {
|
if (found) {
|
||||||
|
|
@ -124,7 +124,7 @@ export default class BingDrawClient {
|
||||||
]
|
]
|
||||||
for (let imageLink of imageLinks) {
|
for (let imageLink of imageLinks) {
|
||||||
if (badImages.indexOf(imageLink) > -1) {
|
if (badImages.indexOf(imageLink) > -1) {
|
||||||
await e.reply('绘图失败:Bad images', true)
|
await e.reply('❌绘图失败:Bad images', true)
|
||||||
logger.error(rText)
|
logger.error(rText)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -135,7 +135,7 @@ export default class BingDrawClient {
|
||||||
clearInterval(timer)
|
clearInterval(timer)
|
||||||
} else {
|
} else {
|
||||||
if (timeoutTimes === 0) {
|
if (timeoutTimes === 0) {
|
||||||
await e.reply('绘图超时', true)
|
await e.reply('❌绘图超时', true)
|
||||||
clearInterval(timer)
|
clearInterval(timer)
|
||||||
timer = null
|
timer = null
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -143,6 +143,6 @@ export default class BingDrawClient {
|
||||||
timeoutTimes--
|
timeoutTimes--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 2000)
|
}, 3000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue