From faecbaf7846faf3649d8e919c85ccd41c6155eac Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sun, 19 Mar 2023 19:47:16 -0600 Subject: [PATCH] t --- matrix_gpt/bot/callbacks.py | 2 ++ matrix_gpt/bot/chat_functions.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix_gpt/bot/callbacks.py b/matrix_gpt/bot/callbacks.py index 39fd054..2e26c5d 100644 --- a/matrix_gpt/bot/callbacks.py +++ b/matrix_gpt/bot/callbacks.py @@ -107,6 +107,8 @@ class Callbacks: 'content': thread_msg if not thread_msg.startswith(self.command_prefix) else thread_msg[len(self.command_prefix):].strip() }) # if len(thread_content) >= 2 and thread_content[0].body.startswith(self.command_prefix): # if thread_content[len(thread_content) - 2].sender == self.client.user + print(thread_content[0].event_id) + # TODO: process_chat() will set typing as false after generating. # TODO: If there is still another query in-progress that typing state will be overwritten by the one that just finished. async def inner(): diff --git a/matrix_gpt/bot/chat_functions.py b/matrix_gpt/bot/chat_functions.py index 6cdf817..b2dd952 100644 --- a/matrix_gpt/bot/chat_functions.py +++ b/matrix_gpt/bot/chat_functions.py @@ -218,8 +218,6 @@ async def process_chat( resp = await send_text_to_room(client, room.room_id, text_response, reply_to_event_id=event.event_id, thread=True, thread_root_id=thread_root_id if thread_root_id else event.event_id) await client.room_typing(room.room_id, typing_state=False, timeout=3000) - print(thread_root_id) - store.add_event_id(event.event_id) if not isinstance(resp, RoomSendResponse): logger.critical(f'Failed to respond to event {event.event_id} in room {room.room_id}:\n{vars(resp)}')