From 20d28e207402417923e6c7e90d7a6cce6301ffa9 Mon Sep 17 00:00:00 2001 From: phixxy Date: Wed, 17 Jan 2024 22:55:13 -0800 Subject: [PATCH] awaited close --- plugins/meme.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/meme.py b/plugins/meme.py index 0cbdad2..38018a8 100644 --- a/plugins/meme.py +++ b/plugins/meme.py @@ -24,7 +24,7 @@ async def answer_question(topic, model="gpt-3.5-turbo"): # Only needed for draw async with http_session.post(url, headers=headers, json=data) as resp: response_data = await resp.json() response = response_data['choices'][0]['message']['content'] - http_session.close() + await http_session.close() return response except Exception as error: @@ -106,7 +106,7 @@ async def meme(ctx): except Exception as error: await handle_error(error) print("Something's Wrong with the urllib So try again") - http_session.close() + await http_session.close() return image_link, filename try: