mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 19:57:04 +08:00
feat(keymgr.py): 热重载后重置超额记录
This commit is contained in:
parent
36def20a07
commit
9962a6ebcc
|
@ -39,13 +39,10 @@ class KeysManager:
|
|||
elif type(api_key) is list:
|
||||
for i in range(len(api_key)):
|
||||
self.api_key[str(i)] = api_key[i]
|
||||
|
||||
self.auto_switch()
|
||||
# 从usage中删除未加载的api-key的记录
|
||||
# 不删了,也许会运行时添加曾经有记录的api-key
|
||||
|
||||
if 'exceeded_keys' in pkg.utils.context.context and pkg.utils.context.context['exceeded_keys'] is not None:
|
||||
self.exceeded = pkg.utils.context.context['exceeded_keys']
|
||||
self.auto_switch()
|
||||
|
||||
# 根据tested自动切换到可用的api-key
|
||||
# 返回是否切换成功, 切换后的api-key的别名
|
||||
|
|
Loading…
Reference in New Issue
Block a user