diff --git a/cogs/text_service_cog.py b/cogs/text_service_cog.py index 3737e0a..2a43eb6 100644 --- a/cogs/text_service_cog.py +++ b/cogs/text_service_cog.py @@ -1084,15 +1084,12 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): # Check if the user is permitted to start a conversation in full channels # check if any of the user role names match CHANNEL_CHAT_ROLES if CHANNEL_CHAT_ROLES and CHANNEL_CHAT_ROLES != [None]: - if not any( - role.name in CHANNEL_CHAT_ROLES for role in ctx.user.roles - ): + if not any(role.name in CHANNEL_CHAT_ROLES for role in ctx.user.roles): await ctx.respond( "You are not permitted to start a conversation in this channel." ) return - target = ctx.channel if private: embed_title = f"{user.name}'s private conversation with GPT" diff --git a/models/openai_model.py b/models/openai_model.py index 77a3a17..6137e0a 100644 --- a/models/openai_model.py +++ b/models/openai_model.py @@ -883,7 +883,10 @@ class Model: text = message.text.replace(bot_name, "") text = text.replace("<|endofstatement|>", "") messages.append( - {"role": "assistant", "content": text} # TODO add back the assistant's name when the API is fixed.. + { + "role": "assistant", + "content": text, + } # TODO add back the assistant's name when the API is fixed.. ) else: try: