mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: add bing timeout
This commit is contained in:
parent
7719b27392
commit
236ec07f38
2 changed files with 4 additions and 2 deletions
|
|
@ -415,7 +415,7 @@ export class chatgpt extends plugin {
|
||||||
return resolve(bingResponse)
|
return resolve(bingResponse)
|
||||||
})
|
})
|
||||||
response = await pTimeout(responseP, {
|
response = await pTimeout(responseP, {
|
||||||
milliseconds: Config.defaultTimeoutMs,
|
milliseconds: Config.bingTimeoutMs,
|
||||||
message: 'Bing timed out waiting for response'
|
message: 'Bing timed out waiting for response'
|
||||||
})
|
})
|
||||||
if (response.details.adaptiveCards?.[0]?.body?.[0]?.text?.trim()) {
|
if (response.details.adaptiveCards?.[0]?.body?.[0]?.text?.trim()) {
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,11 @@ export const Config = {
|
||||||
'2captchaToken': '',
|
'2captchaToken': '',
|
||||||
// http或socks5代理
|
// http或socks5代理
|
||||||
proxy: PROXY,
|
proxy: PROXY,
|
||||||
debug: false,
|
debug: true,
|
||||||
// 各个地方的默认超时时间
|
// 各个地方的默认超时时间
|
||||||
defaultTimeoutMs: 120000,
|
defaultTimeoutMs: 120000,
|
||||||
|
// bing默认超时时间,bing太慢了有的时候
|
||||||
|
bingTimeoutMs: 360000,
|
||||||
// 浏览器默认超时,浏览器可能需要更高的超时时间
|
// 浏览器默认超时,浏览器可能需要更高的超时时间
|
||||||
chromeTimeoutMS: 120000
|
chromeTimeoutMS: 120000
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue