From 05e6fea951ce192dd12f9ec92129c4df8f25ec1d Mon Sep 17 00:00:00 2001 From: Elias2660 Date: Thu, 11 Jul 2024 02:37:20 +0000 Subject: [PATCH] Automated formatting changes --- cogs/ChatBotPrompts.py | 15 +++++++++------ utils/gptFunctions.py | 8 +++++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cogs/ChatBotPrompts.py b/cogs/ChatBotPrompts.py index 2258961..ee76ade 100644 --- a/cogs/ChatBotPrompts.py +++ b/cogs/ChatBotPrompts.py @@ -21,12 +21,12 @@ async def simple_query( if len(message) < 1: await interaction.response.send_message("Please provide a query") return - + if "gpt" in model: response = gptFunctions.perform_gpt_query(query=message, model=model) elif "gemini" in model: response = gptFunctions.perform_google_query(query=message, model=model) - + embed = discord.Embed(title="Chatbot Prompt", color=discord.Color.blue()) embed.set_author( name=f"query by {interaction.user.display_name} and response from {model}", @@ -78,8 +78,10 @@ async def list_models(self, interaction: discord.Interaction): ) async def max_context(self, interaction: discord.Interaction): context = gptFunctions.get_input_contexts() - await interaction.response.send_message("\n".join(f"{key}: {value}" for key, value in context.items())) - + await interaction.response.send_message( + "\n".join(f"{key}: {value}" for key, value in context.items()) + ) + @commands.cooldown(1, 15, commands.BucketType.user) @app_commands.command( name="max_output", @@ -87,9 +89,10 @@ async def max_context(self, interaction: discord.Interaction): ) async def max_output(self, interaction: discord.Interaction): output = gptFunctions.get_output_contexts() - await interaction.response.send_message("\n".join(f"{key}: {value}" for key, value in output.items())) + await interaction.response.send_message( + "\n".join(f"{key}: {value}" for key, value in output.items()) + ) - async def setup(client): await client.add_cog(ChatBotPrompts(client)) diff --git a/utils/gptFunctions.py b/utils/gptFunctions.py index 140b961..6e251a0 100644 --- a/utils/gptFunctions.py +++ b/utils/gptFunctions.py @@ -239,4 +239,10 @@ def get_output_contexts() -> set: if __name__ == "__main__": print("hello") - print(perform_google_query(system_message, "Write a poem about Discord in the writing of Emily Dickenson", "gemini-1.5-pro")) + print( + perform_google_query( + system_message, + "Write a poem about Discord in the writing of Emily Dickenson", + "gemini-1.5-pro", + ) + )