removed handle_error

This commit is contained in:
phixxy 2024-01-20 01:53:22 -08:00
parent 38009ae56e
commit 168481f96a

View file

@ -177,15 +177,14 @@ class PhixxyCom(commands.Cog):
url = "https://api.openai.com/v1/chat/completions"
try:
http_session = aiohttp.ClientSession()
async with http_session.post(url, headers=headers, json=data) as resp:
async with self.bot.http_session.post(url, headers=headers, json=data) as resp:
response_data = await resp.json()
response = response_data['choices'][0]['message']['content']
await http_session.close()
return response
except Exception as error:
return await self.handle_error(error)
return None
#return await self.handle_error(error)
@commands.command()
async def generate_blog(self, ctx):