chore: 修改包名

This commit is contained in:
RockChinQ
2024-01-28 19:20:10 +08:00
parent 698782c537
commit b730f17eb6
45 changed files with 27 additions and 27 deletions

View File

@@ -0,0 +1,25 @@
from __future__ import annotations
import typing
import pydantic
class TokenManager():
provider: str
tokens: list[str]
using_token_index: typing.Optional[int] = 0
def __init__(self, provider: str, tokens: list[str]):
self.provider = provider
self.tokens = tokens
self.using_token_index = 0
def get_token(self) -> str:
return self.tokens[self.using_token_index]
def next_token(self):
self.using_token_index = (self.using_token_index + 1) % len(self.tokens)