Format Python code with psf/black push

github-actions 1 year ago
parent 6dc58ea025
commit 07b6882a95

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

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

Loading…
Cancel
Save