Format Python code with psf/black push

github-actions 2 years ago
parent 434cbdfc6d
commit 0c862901f0

@ -1070,7 +1070,14 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"):
"""Message command. Return the message"""
prompt = await self.mention_to_username(ctx, message.content)
await self.ask_command(
ctx, prompt,private=False,temperature= None,top_p= None,frequency_penalty= None,presence_penalty= None, from_ask_action=prompt
ctx,
prompt,
private=False,
temperature=None,
top_p=None,
frequency_penalty=None,
presence_penalty=None,
from_ask_action=prompt,
)
async def paraphrase_action(self, ctx, message: discord.Message):
@ -1092,7 +1099,14 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"):
return
await self.ask_command(
ctx, prompt, private=False, temperature= None, top_p=None, frequency_penalty=None, presence_penalty=None, from_other_action=from_other_action
ctx,
prompt,
private=False,
temperature=None,
top_p=None,
frequency_penalty=None,
presence_penalty=None,
from_other_action=from_other_action,
)
async def elaborate_action(self, ctx, message: discord.Message):
@ -1104,7 +1118,6 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"):
# Construct the paraphrase prompt
prompt = f"Elaborate with more information about the subject of the following message. Be objective and detailed and respond with elaborations only about the subject(s) of the message: {prompt} \n\nElaboration:"
tokens = self.model.usage_service.count_tokens(prompt)
if tokens > self.model.max_tokens - 500:
await ctx.respond(
@ -1115,7 +1128,14 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"):
return
await self.ask_command(
ctx, prompt=prompt, private=False, temperature=None,top_p=None, frequency_penalty=None, presence_penalty=None, from_other_action=from_other_action
ctx,
prompt=prompt,
private=False,
temperature=None,
top_p=None,
frequency_penalty=None,
presence_penalty=None,
from_other_action=from_other_action,
)
async def summarize_action(self, ctx, message: discord.Message):
@ -1139,5 +1159,12 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"):
return
await self.ask_command(
ctx, prompt,private=False, temperature=None, top_p=None, frequency_penalty=None, presence_penalty=None, from_other_action=from_other_action
ctx,
prompt,
private=False,
temperature=None,
top_p=None,
frequency_penalty=None,
presence_penalty=None,
from_other_action=from_other_action,
)

@ -73,7 +73,7 @@ class Search:
try:
async with aiohttp.ClientSession() as session:
async with session.get(link, timeout=3) as response:
pass # Only catch timeout errors, allow for redirects for now..
pass # Only catch timeout errors, allow for redirects for now..
except:
traceback.print_exc()
continue

Loading…
Cancel
Save