diff --git a/setup.py b/setup.py index 760d607..58779ef 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ setup( name="python-tgpt", - version="0.7.6", + version="0.7.7", license="MIT", author="Smartwa", maintainer="Smartwa", diff --git a/src/pytgpt/novita/main.py b/src/pytgpt/novita/main.py index 26d6270..3aa4cc7 100644 --- a/src/pytgpt/novita/main.py +++ b/src/pytgpt/novita/main.py @@ -36,10 +36,10 @@ class NOVITA(OPENAI): """Novita AI provider""" def __init__(self, *args, **kwargs): - kwargs.setdefault("model", model) - if not model in available_models: + model_choice = kwargs.setdefault("model", model) + if not model_choice in available_models: raise UnsupportedModelError( - f"Model '{model}' is not yet supported. Choose from {available_models}" + f"Model '{model_choice}' is not yet supported. Choose from {available_models}" ) super().__init__(*args, **kwargs) self.chat_endpoint = "https://api.novita.ai/v3/openai/chat/completions" @@ -49,10 +49,10 @@ class AsyncNOVITA(AsyncOPENAI): """Async Novita AI provider""" def __init__(self, *args, **kwargs): - kwargs.setdefault("model", model) - if not model in available_models: + model_choice = kwargs.setdefault("model", model) + if not model_choice in available_models: raise UnsupportedModelError( - f"Model '{model}' is not yet supported choose from {available_models}" + f"Model '{model_choice}' is not yet supported. Choose from {available_models}" ) super().__init__(*args, **kwargs) self.chat_endpoint = "https://api.novita.ai/v3/openai/chat/completions"