From 1e5f82c5c727da5604387f25f505c6194970ea9a Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sat, 18 Mar 2023 14:48:29 -0600 Subject: [PATCH] logging --- matrix_gpt/bot/chat_functions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matrix_gpt/bot/chat_functions.py b/matrix_gpt/bot/chat_functions.py index 3c25279..b64f711 100644 --- a/matrix_gpt/bot/chat_functions.py +++ b/matrix_gpt/bot/chat_functions.py @@ -206,8 +206,9 @@ async def process_chat(client, room, event, command, store, openai, thread_root_ temperature=0, ) text_response = response["choices"][0]["message"]["content"].strip().strip('\n') - z = command.replace("\n", "\\n") - logger.info(f'Reply to {event.event_id} --> "{z}" and bot responded with "{text_response}"') + x = command.replace("\n", "\\n") + z = text_response.replace("\n", "\\n") + logger.info(f'Reply to {event.event_id} --> "{x}" and bot responded with "{z}"') 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) store.add_event_id(event.event_id)