mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 增加实验性质的sydney反代,频繁throttle的用户可开启试试
This commit is contained in:
parent
fd408586a8
commit
da5adc0d10
3 changed files with 16 additions and 26 deletions
|
|
@ -134,11 +134,15 @@ export default class SydneyAIClient {
|
|||
let WebSocket = await getWebSocket()
|
||||
return new Promise((resolve, reject) => {
|
||||
let agent
|
||||
let sydneyHost = 'wss://sydney.bing.com'
|
||||
if (this.opts.proxy) {
|
||||
agent = new HttpsProxyAgent(this.opts.proxy)
|
||||
}
|
||||
let ws = new WebSocket('wss://sydney.bing.com/sydney/ChatHub', { agent })
|
||||
|
||||
if (Config.sydneyWebsocketUseProxy) {
|
||||
sydneyHost = Config.sydneyReverseProxy.replace('https://', 'wss://').replace('http://', 'ws://')
|
||||
}
|
||||
logger.mark(`use sydney websocket host: ${sydneyHost}`)
|
||||
let ws = new WebSocket(sydneyHost + '/sydney/ChatHub', { agent })
|
||||
ws.on('error', (err) => {
|
||||
reject(err)
|
||||
})
|
||||
|
|
@ -378,6 +382,7 @@ export default class SydneyAIClient {
|
|||
author: 'user',
|
||||
inputMethod: 'Keyboard',
|
||||
text: message,
|
||||
// messageType: 'Chat'
|
||||
messageType: 'SearchQuery'
|
||||
},
|
||||
conversationSignature,
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ const defaultConfig = {
|
|||
sydney: pureSydneyInstruction,
|
||||
sydneyReverseProxy: 'https://666102.201666.xyz',
|
||||
sydneyForceUseReverse: false,
|
||||
sydneyWebsocketUseProxy: false,
|
||||
sydneyBrainWash: true,
|
||||
sydneyBrainWashStrength: 15,
|
||||
sydneyBrainWashName: 'Sydney',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue