add initial test message
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user