mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: fallback gpt4-o
This commit is contained in:
parent
5aa90788c2
commit
01425103f4
1 changed files with 5 additions and 3 deletions
|
|
@ -164,10 +164,12 @@ export class OfficialChatGPTClient {
|
|||
}
|
||||
} catch (err) {
|
||||
logger.warn(err)
|
||||
if (err.message?.includes('You have sent too many messages to the model. Please try again later.')) {
|
||||
if (typeof err === 'string') {
|
||||
if (err.includes('You have sent too many messages to the model. Please try again later.')) {
|
||||
logger.warn('账户的gpt-o额度不足,将降级为auto重试')
|
||||
opts.model = 'auto'
|
||||
}
|
||||
}
|
||||
return await this.sendMessage(prompt, opts, retry - 1, err.message)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue