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.
This commit is contained in:
Kumi 2024-08-04 20:04:50 +02:00
parent 56b4f3617c
commit 5378ac39e4
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -175,6 +175,8 @@ class OpenAI(BaseAI):
self.logger.log(f"Incoming messages: {messages}", "debug") self.logger.log(f"Incoming messages: {messages}", "debug")
messages.append(event)
for message in messages: for message in messages:
if isinstance(message, (RoomMessageNotice, RoomMessageText)): if isinstance(message, (RoomMessageNotice, RoomMessageText)):
role = ( role = (