ironed out bugs

Kaveen Kumarasinghe 2 years ago
parent 64da81b0d1
commit c54d2cc349

@ -1,7 +1,10 @@
# Screenshots
<p align="center"><img src="https://i.imgur.com/ub9EAEe.png"/>
<img src="https://i.imgur.com/DDQWJIy.png"/></p>
<p align="center">
<img width=80% height=80% src="https://i.imgur.com/KeLpDgj.png"/>
<img width=80% height=80% src="https://i.imgur.com/AFCwxgJ.png"/>
</p>

@ -213,13 +213,14 @@ class SaveView(discord.ui.View):
self.converser_cog = converser_cog
for x in range(1, len(image_urls) + 1):
self.add_item(SaveButton(x, image_urls[x - 1]))
if not no_retry:
self.add_item(RedoButton(self.cog, converser_cog=self.converser_cog))
for x in range(1, len(image_urls) + 1):
self.add_item(
VaryButton(
x, image_urls[x - 1], self.cog, converser_cog=self.converser_cog
)
)
if not no_retry:
self.add_item(RedoButton(self.cog, converser_cog=self.converser_cog))
class VaryButton(discord.ui.Button):

@ -164,7 +164,7 @@ class GPT3ComCon(commands.Cog, name="GPT3ComCon"):
async def send_help_text(self, message):
embed = discord.Embed(
title="GPT3Bot Help", description="The current commands", color=0x00FF00
title="GPT3Bot Help", description="The current commands", color=0xC730C7
)
embed.add_field(
name="!g <prompt>",

@ -141,7 +141,7 @@ class DrawButton(discord.ui.Button["OptimizeView"]):
return
msg = await interaction.response.send_message(
"Drawing this prompt!", ephemeral=False
"Drawing this prompt...", ephemeral=False
)
self.converser_cog.users_to_interactions[interaction.user.id].append(msg.id)
self.converser_cog.users_to_interactions[interaction.user.id].append(
@ -156,7 +156,7 @@ class DrawButton(discord.ui.Button["OptimizeView"]):
# Use regex to replace "Output Prompt:" loosely with nothing.
# This is to ensure that the prompt is formatted correctly
prompt = re.sub(r"Output Prompt: ?", "", prompt)
prompt = re.sub(r"Optimized Prompt: ?", "", prompt)
# Call the image service cog to draw the image
await self.image_service_cog.encapsulated_send(

@ -389,8 +389,10 @@ class Model:
# If the image size is greater than 8MB, we can't return this to the user, so we will need to downscale the
# image and try again
safety_counter = 0
while image_size > 8 or safety_counter >= 2:
while image_size > 8:
safety_counter += 1
if safety_counter >= 2:
break
print(
f"Image size is {image_size}MB, which is too large for discord. Downscaling and trying again"
)

Loading…
Cancel
Save