diff --git a/models/openai_model.py b/models/openai_model.py index 48cea17..e5ea5ec 100644 --- a/models/openai_model.py +++ b/models/openai_model.py @@ -235,7 +235,6 @@ class Model: else 5 ) - def reset_settings(self): keys = [ "temp", diff --git a/services/environment_service.py b/services/environment_service.py index c17c709..94d55e8 100644 --- a/services/environment_service.py +++ b/services/environment_service.py @@ -405,7 +405,10 @@ class EnvService: openai_token = os.getenv("OPENAI_TOKEN") return openai_token except Exception: - raise ValueError("OPENAI_TOKEN is not defined properly in the environment file! The bot cannot start without this token.") + raise ValueError( + "OPENAI_TOKEN is not defined properly in the environment file! The bot cannot start without this token." + ) + @staticmethod def get_openai_organization(): try: diff --git a/services/text_service.py b/services/text_service.py index 901538c..9046767 100644 --- a/services/text_service.py +++ b/services/text_service.py @@ -284,7 +284,10 @@ class TextService: and ( ( model is not None - and (model in Models.CHATGPT_MODELS or (model == "chatgpt" or "gpt-4" in model)) + and ( + model in Models.CHATGPT_MODELS + or (model == "chatgpt" or "gpt-4" in model) + ) ) or ( model is None @@ -293,7 +296,9 @@ class TextService: ) ) delegator = model or converser_cog.model.model - is_chatgpt_request = delegator in Models.CHATGPT_MODELS or delegator in Models.GPT4_MODELS + is_chatgpt_request = ( + delegator in Models.CHATGPT_MODELS or delegator in Models.GPT4_MODELS + ) if is_chatgpt_conversation: _prompt_with_history = converser_cog.conversation_threads[