No need, fixed in latest api

This commit is contained in:
Yasir Aris M 2024-08-12 23:09:44 +07:00 committed by GitHub
parent c23a0281a9
commit d8bf64a25b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,7 +76,7 @@ async def gpt4_chatbot(self, ctx: Message, strings):
if response.status_code != 200:
return await msg.edit_msg(f"ERROR: Status Code {response.json()}")
try:
await msg.edit_msg(f"{response.json()['choices'][0]['message']['content'].replace('undefined', '')}\n\n<b>Powered by:</b> <code>GPT 4o Mini</code>")
await msg.edit_msg(f"{response.json()['choices'][0]['message']['content']}\n\n<b>Powered by:</b> <code>GPT 4o Mini</code>")
except Exception as err:
await msg.edit_msg(f"ERROR: {err}")