Format Python code with psf/black push

github-actions 1 year ago
parent 58dc7e19bd
commit e2c7430c24

@ -235,7 +235,6 @@ class Model:
else 5
)
def reset_settings(self):
keys = [
"temp",

@ -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:

@ -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[

Loading…
Cancel
Save