From 5378ac39e42973e5ec1519bd3e8ce173c73f1433 Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 4 Aug 2024 20:04:50 +0200 Subject: [PATCH] feat(openai): add event to incoming messages Appended the event to the incoming messages list to ensure it gets processed. This change addresses situations where events were previously being overlooked, potentially leading to incomplete or incorrect processing. This enhancement ensures a more comprehensive handling of incoming data. --- src/gptbot/classes/ai/openai.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gptbot/classes/ai/openai.py b/src/gptbot/classes/ai/openai.py index e7cdb19..ffe910a 100644 --- a/src/gptbot/classes/ai/openai.py +++ b/src/gptbot/classes/ai/openai.py @@ -175,6 +175,8 @@ class OpenAI(BaseAI): self.logger.log(f"Incoming messages: {messages}", "debug") + messages.append(event) + for message in messages: if isinstance(message, (RoomMessageNotice, RoomMessageText)): role = (