From 13269f3773d0b693d9bed2a19b0757026a025091 Mon Sep 17 00:00:00 2001 From: PascalEgn Date: Mon, 15 Jul 2024 15:14:52 +0200 Subject: [PATCH] openai: fix function call --- reminder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reminder.py b/reminder.py index 9bb699b..96e74a7 100644 --- a/reminder.py +++ b/reminder.py @@ -94,6 +94,7 @@ def next_daily(today): return next_daily.strftime("**%Y-%m-%d** at **%H:%M**") + @staticmethod def get_openai_message(meeting_type, zoom_link, time_until_meeting): character = ["Marvin from Hitchhiker's Guide To The Galaxy."] client = OpenAI(timeout=httpx.Timeout(15.0, read=5.0, write=10.0, connect=3.0), api_key=os.environ.get("OPENAI_API_KEY"),) @@ -176,7 +177,7 @@ def send_notification(self, meeting, today): if now_minus_5 == today.time(): try: - Reminder.get_openai_message(meeting, zoom_link, 5) + content = Reminder.get_openai_message(meeting, zoom_link, 5) except Exception: content = f"@**all** [meeting]({zoom_link}) in 5 minutes."