Skip to content

Commit fe5aac6

Browse files
committed
fix: allow server error
1 parent 60c64a5 commit fe5aac6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

manager/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ async def __login_openai_apikey(self, account):
423423
openai.proxy = proxy
424424
account.proxy = proxy
425425
logger.info("当前检查的 API Key 为:" + account.api_key[:8] + "******" + account.api_key[-4:])
426-
total_available = 0.00001
427426
try:
428427

429428
grant_used, grant_available, has_payment_method, total_usage, hard_limit_usd = await self.check_api_info(
@@ -437,6 +436,7 @@ async def __login_openai_apikey(self, account):
437436

438437
logger.success(f"查询到 API 总可用余额: {total_available}美元")
439438
except:
439+
total_available = 0.00001
440440
logger.warning("在查询 API 额度时遇到问题,请自行确认额度。")
441441

442442
if int(total_available) <= 0:

0 commit comments

Comments
 (0)