mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
feat: 必应无需token即可进行对话(max20->5)
This commit is contained in:
parent
3c437ddfc5
commit
375fad8a20
2 changed files with 7 additions and 3 deletions
|
|
@ -1661,7 +1661,7 @@ export class chatgpt extends plugin {
|
|||
// 如果token曾经有异常,则清除异常
|
||||
let Tokens = JSON.parse(await redis.get('CHATGPT:BING_TOKENS'))
|
||||
const TokenIndex = Tokens.findIndex(element => element.Token === abtrs.bingToken)
|
||||
if (Tokens[TokenIndex].exception) {
|
||||
if (TokenIndex > 0 && Tokens[TokenIndex].exception) {
|
||||
delete Tokens[TokenIndex].exception
|
||||
await redis.set('CHATGPT:BING_TOKENS', JSON.stringify(Tokens))
|
||||
}
|
||||
|
|
@ -2140,7 +2140,11 @@ async function getAvailableBingToken (conversation, throttled = []) {
|
|||
})
|
||||
bingToken = minElement.Token
|
||||
} else {
|
||||
throw new Error('全部Token均已失效,暂时无法使用')
|
||||
// throw new Error('全部Token均已失效,暂时无法使用')
|
||||
return {
|
||||
bingToken: null,
|
||||
allThrottled
|
||||
}
|
||||
}
|
||||
if (Config.toneStyle != 'Sydney' && Config.toneStyle != 'Custom') {
|
||||
// bing 下,需要保证同一对话使用同一账号的token
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue