diff --git a/tests/conftest.py b/tests/conftest.py index 11ee18c..f1c6242 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,6 +7,6 @@ @pytest.fixture(scope='session', autouse=True) def api_keys(): for envvar in SERVICE_APIKEY_ENVVAR_MAP.values(): - os.environ[envvar] = os.getenv(envvar) + os.environ[envvar] = os.getenv(envvar) or '' # type: ignore load_dotenv() yield diff --git a/werewolf/const.py b/werewolf/const.py index eb1ccea..71abb36 100644 --- a/werewolf/const.py +++ b/werewolf/const.py @@ -60,7 +60,6 @@ class EChatService(Enum): 'gemini-1.5-flash': EChatService.Google, "gemini-pro-vision": EChatService.Google, 'gemini-pro': EChatService.Google, - 'mixtral-8x7b-32768': EChatService.Groq, 'gemma2-9b-it': EChatService.Groq, 'gemma2-7b-it': EChatService.Groq, 'llama3-groq-70b-8192-tool-use-preview': EChatService.Groq, diff --git a/werewolf/main.py b/werewolf/main.py index 6e72ce9..5f1a677 100644 --- a/werewolf/main.py +++ b/werewolf/main.py @@ -69,7 +69,7 @@ def main( 'model': model, 'api_type': service.value, # FIXME: this is not good because the raw token is on memory - 'api_key': os.getenv(SERVICE_APIKEY_ENVVAR_MAP[service]), + 'api_key': os.getenv(SERVICE_APIKEY_ENVVAR_MAP[service]), # type: ignore # noqa }] result = game( diff --git a/werewolf/utils/openai.py b/werewolf/utils/openai.py index e696b11..b2bf884 100644 --- a/werewolf/utils/openai.py +++ b/werewolf/utils/openai.py @@ -4,7 +4,7 @@ from ..utils.utils import deprecate -@deprecate(msg='Use werewolf.chat_models.create_chat_model instead.') +@deprecate(msg='Use werewolf.chat_models.create_chat_model instead.') # type: ignore # noqa @lru_cache(maxsize=None) def create_chat_openai_model( llm: ChatOpenAI | str | None = None, diff --git a/werewolf/utils/utils.py b/werewolf/utils/utils.py index a78bcf6..60e5ba8 100644 --- a/werewolf/utils/utils.py +++ b/werewolf/utils/utils.py @@ -58,7 +58,7 @@ def deprecate( logger: Logger = getLogger(__name__), ) -> ( Callable[[InputType], OutputType] - | Callable[[Callable[[InputType], OutputType]], Callable[[InputType], OutputType]] + | Callable[[Callable[[InputType], OutputType]], Callable[[InputType], OutputType]] # noqa ): """Decorator to deprecate a function. @@ -72,7 +72,7 @@ def deprecate( """ # noqa if func is None: - return partial(deprecate, msg=msg, logger=logger) + return partial(deprecate, msg=msg, logger=logger) # type: ignore def wrapper(*args, **kwargs): if hasattr(func, '__name__'):