diff --git a/chatGpt/chatgpt.py b/chatGpt/chatgpt.py index cbe0b9c..f227498 100644 --- a/chatGpt/chatgpt.py +++ b/chatGpt/chatgpt.py @@ -12,13 +12,16 @@ class ChatGpt(commands.Cog): self.bot = bot @commands.command() - async def testchat(self, ctx: commands.Context): + async def testchat(self, ctx: commands.Context, msg): """Test""" config = await self.setCredentials(ctx) - email = config.get("email") - password = config.get("password") - await ctx.send(f"email {email}, password {password}") + chatbot = Chatbot(config, conversation_id=None) + chatbot.reset_chat() + chatbot.refresh_session() + resp = chatbot.get_chat_response(msg, output="text") + + await ctx.send(f"{resp['message']}") async def setCredentials(self, ctx: commands.Context): openAiKeys = await self.bot.get_shared_api_tokens("openai")