fix: add bing timeout

This commit is contained in:
ikechan8370 2023-02-15 12:22:02 +08:00
parent 7719b27392
commit 236ec07f38
2 changed files with 4 additions and 2 deletions

View file

@ -415,7 +415,7 @@ export class chatgpt extends plugin {
return resolve(bingResponse)
})
response = await pTimeout(responseP, {
milliseconds: Config.defaultTimeoutMs,
milliseconds: Config.bingTimeoutMs,
message: 'Bing timed out waiting for response'
})
if (response.details.adaptiveCards?.[0]?.body?.[0]?.text?.trim()) {

View file

@ -60,9 +60,11 @@ export const Config = {
'2captchaToken': '',
// http或socks5代理
proxy: PROXY,
debug: false,
debug: true,
// 各个地方的默认超时时间
defaultTimeoutMs: 120000,
// bing默认超时时间bing太慢了有的时候
bingTimeoutMs: 360000,
// 浏览器默认超时,浏览器可能需要更高的超时时间
chromeTimeoutMS: 120000
}