mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-04 04:54:36 +00:00
fix: handle case of empty token list in TokenManager to prevent errors
This commit is contained in:
@@ -18,6 +18,8 @@ class TokenManager:
|
||||
self.using_token_index = 0
|
||||
|
||||
def get_token(self) -> str:
|
||||
if len(self.tokens) == 0:
|
||||
return ''
|
||||
return self.tokens[self.using_token_index]
|
||||
|
||||
def next_token(self):
|
||||
|
||||
Reference in New Issue
Block a user