From 22e9461a7e092c384900c64d19177e4a44d61562 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Wed, 19 Feb 2025 17:18:03 +0100 Subject: [PATCH] Fix --- .../stream_notifications/messages_proc.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/modules/stream_notifications/messages_proc.py b/src/modules/stream_notifications/messages_proc.py index 7292711..056130e 100644 --- a/src/modules/stream_notifications/messages_proc.py +++ b/src/modules/stream_notifications/messages_proc.py @@ -98,7 +98,7 @@ async def get_completion(messages: list[dict]) -> str: data_messages = [ { "role": "system", - "content": "Don't use markdown! Don't use blocked words on Twitch! Make answers short and clear!" + "content": "Don't use markdown! Don't use blocked words on Twitch! Make answers short and clear! Your name is kurbezz!" }, *( { @@ -213,6 +213,13 @@ class MessagesProc: part, reply_parent_message_id=event.message_id ) + + cls.update_message_history( + id="ai", + text=part, + user="kurbezz", + thread_id=event.message_id + ) except Exception as e: logger.error("Failed to get completion: {}", e, exc_info=True) @@ -247,6 +254,13 @@ class MessagesProc: part, reply_parent_message_id=event.message_id ) + + cls.update_message_history( + id="ai", + text=part, + user="kurbezz", + thread_id=event.message_id + ) except Exception as e: logger.error(f"Failed to get completion: {e}")