mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: bing模式也走sydney代理
This commit is contained in:
parent
eb15c51d81
commit
355817e20b
3 changed files with 15 additions and 10 deletions
11
apps/chat.js
11
apps/chat.js
|
|
@ -756,12 +756,17 @@ export class chatgpt extends plugin {
|
|||
delete conversation.invocationId
|
||||
delete conversation.conversationSignature
|
||||
} else {
|
||||
bingAIClient = new BingAIClient({
|
||||
let bingOption = {
|
||||
userToken: bingToken, // "_U" cookie from bing.com
|
||||
cookies,
|
||||
debug: Config.debug,
|
||||
proxy: Config.proxy
|
||||
})
|
||||
proxy: Config.proxy,
|
||||
host: Config.sydneyReverseProxy
|
||||
}
|
||||
if (Config.proxy && Config.sydneyReverseProxy && !Config.sydneyForceUseReverse) {
|
||||
delete bingOption.host
|
||||
}
|
||||
bingAIClient = new BingAIClient(bingOption)
|
||||
}
|
||||
let response
|
||||
let reply = ''
|
||||
|
|
|
|||
12
package.json
12
package.json
|
|
@ -9,18 +9,18 @@
|
|||
"keyv-file": "^0.2.0",
|
||||
"node-fetch": "^3.3.0",
|
||||
"openai": "^3.2.1",
|
||||
"puppeteer-extra": "^3.3.6",
|
||||
"puppeteer-extra-plugin-recaptcha": "^3.6.8",
|
||||
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
||||
"random": "^4.1.0",
|
||||
"undici": "^5.20.0",
|
||||
"uuid": "^9.0.0",
|
||||
"ws": "^8.12.1"
|
||||
"ws": "^8.12.1",
|
||||
"https-proxy-agent": "5.0.1",
|
||||
"keyv": "^4.5.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"https-proxy-agent": "5.0.1",
|
||||
"puppeteer-extra": "^3.3.6",
|
||||
"puppeteer-extra-plugin-recaptcha": "^3.6.8",
|
||||
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
||||
"jimp": "^0.22.7",
|
||||
"keyv": "^4.5.2",
|
||||
"sharp": "^0.31.3"
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ async function getKeyv () {
|
|||
try {
|
||||
Keyv = (await import('keyv')).default
|
||||
} catch (error) {
|
||||
throw new Error('ws依赖未安装,请使用pnpm install keyv安装')
|
||||
throw new Error('keyv依赖未安装,请使用pnpm install keyv安装')
|
||||
}
|
||||
return Keyv
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue