Skip to content

Commit

Permalink
chore: rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
lss233 committed Apr 20, 2023
1 parent 456a350 commit e5e5496
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions manager/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,12 @@ async def __login_openai_apikey(self, account):
logger.warning("在查询 API 额度时遇到问题,请自行确认额度。")
return account

def pick(self, type: str):
if type not in self.roundrobin:
self.roundrobin[type] = itertools.cycle(self.bots[type])
if len(self.bots[type]) == 0:
raise NoAvailableBotException(type)
return next(self.roundrobin[type])
def pick(self, llm: str):
if llm not in self.roundrobin:
self.roundrobin[llm] = itertools.cycle(self.bots[llm])
if len(self.bots[llm]) == 0:
raise NoAvailableBotException(llm)
return next(self.roundrobin[llm])

def bots_info(self):
from constants import LlmName
Expand Down

0 comments on commit e5e5496

Please sign in to comment.