mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
feat: support the complete bing cookie which contains _U
This commit is contained in:
parent
1296eccb48
commit
0f7122f865
1 changed files with 5 additions and 0 deletions
|
|
@ -408,8 +408,13 @@ export class chatgpt extends plugin {
|
||||||
if (!bingToken) {
|
if (!bingToken) {
|
||||||
throw new Error('未绑定Bing Cookie,请使用#chatgpt设置必应token命令绑定Bing Cookie')
|
throw new Error('未绑定Bing Cookie,请使用#chatgpt设置必应token命令绑定Bing Cookie')
|
||||||
}
|
}
|
||||||
|
let cookie = undefined
|
||||||
|
if (bingToken?.indexOf('=') > -1) {
|
||||||
|
cookie = bingToken
|
||||||
|
}
|
||||||
const bingAIClient = new BingAIClient({
|
const bingAIClient = new BingAIClient({
|
||||||
userToken: bingToken, // "_U" cookie from bing.com
|
userToken: bingToken, // "_U" cookie from bing.com
|
||||||
|
cookie,
|
||||||
debug: Config.debug
|
debug: Config.debug
|
||||||
})
|
})
|
||||||
let response
|
let response
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue