feat: support the complete bing cookie which contains _U

This commit is contained in:
ikechan8370 2023-02-16 16:08:07 +08:00
parent 1296eccb48
commit 0f7122f865

View file

@ -408,8 +408,13 @@ export class chatgpt extends plugin {
if (!bingToken) {
throw new Error('未绑定Bing Cookie请使用#chatgpt设置必应token命令绑定Bing Cookie')
}
let cookie = undefined
if (bingToken?.indexOf('=') > -1) {
cookie = bingToken
}
const bingAIClient = new BingAIClient({
userToken: bingToken, // "_U" cookie from bing.com
cookie,
debug: Config.debug
})
let response