Skip to content

Commit

Permalink
Added logging statement
Browse files Browse the repository at this point in the history
  • Loading branch information
JMaynor authored Sep 12, 2024
1 parent 14b8bb8 commit 526e713
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
strings_path = os.path.join(current_dir, "..", "..", "locales", "strings.json")
with open(strings_path, "r") as f:
json_data = json.load(f)
system_messages = json_data.get("LLM_SYSTEM_MESSAGES", [])
snarky_comments = json_data.get("SNARKY_COMMENTS", [])
system_messages = json_data.get("LLM_SYSTEM_MESSAGES", [""])
snarky_comments = json_data.get("SNARKY_COMMENTS", [""])


class generation(commands.Cog):
Expand Down Expand Up @@ -156,6 +156,7 @@ async def generate_image(self, ctx, *, prompt: str):
user=str(ctx.author.id),
)
image_url = response.data[0].url
logger.info("Generated image URL: {image_url}")
except Exception as e:
logger.error(e)
await ctx.respond(f"Error generating image: {e}.")
Expand Down

0 comments on commit 526e713

Please sign in to comment.