mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +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.invocationId
|
||||||
delete conversation.conversationSignature
|
delete conversation.conversationSignature
|
||||||
} else {
|
} else {
|
||||||
bingAIClient = new BingAIClient({
|
let bingOption = {
|
||||||
userToken: bingToken, // "_U" cookie from bing.com
|
userToken: bingToken, // "_U" cookie from bing.com
|
||||||
cookies,
|
cookies,
|
||||||
debug: Config.debug,
|
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 response
|
||||||
let reply = ''
|
let reply = ''
|
||||||
|
|
|
||||||
12
package.json
12
package.json
|
|
@ -9,18 +9,18 @@
|
||||||
"keyv-file": "^0.2.0",
|
"keyv-file": "^0.2.0",
|
||||||
"node-fetch": "^3.3.0",
|
"node-fetch": "^3.3.0",
|
||||||
"openai": "^3.2.1",
|
"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",
|
"random": "^4.1.0",
|
||||||
"undici": "^5.20.0",
|
"undici": "^5.20.0",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"ws": "^8.12.1"
|
"ws": "^8.12.1",
|
||||||
|
"https-proxy-agent": "5.0.1",
|
||||||
|
"keyv": "^4.5.2"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"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",
|
"jimp": "^0.22.7",
|
||||||
"keyv": "^4.5.2",
|
|
||||||
"sharp": "^0.31.3"
|
"sharp": "^0.31.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -41,7 +41,7 @@ async function getKeyv () {
|
||||||
try {
|
try {
|
||||||
Keyv = (await import('keyv')).default
|
Keyv = (await import('keyv')).default
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error('ws依赖未安装,请使用pnpm install keyv安装')
|
throw new Error('keyv依赖未安装,请使用pnpm install keyv安装')
|
||||||
}
|
}
|
||||||
return Keyv
|
return Keyv
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue