From 9f5475db75680bd4958d5b99d2177da06bdd3971 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sat, 18 Mar 2023 15:08:34 -0600 Subject: [PATCH] fix logging --- matrix_gpt/bot/chat_functions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matrix_gpt/bot/chat_functions.py b/matrix_gpt/bot/chat_functions.py index 2c8d85f..16cfb7c 100644 --- a/matrix_gpt/bot/chat_functions.py +++ b/matrix_gpt/bot/chat_functions.py @@ -211,6 +211,8 @@ async def process_chat(client, room, event, command, store, openai, thread_root_ z = text_response.replace("\n", "\\n") if isinstance(command, str): x = command.replace("\n", "\\n") + elif isinstance(command, list): + x = command[-1]['content'].replace("\n", "\\n") else: x = command logger.info(f'Reply to {event.event_id} --> "{x}" and bot responded with "{z}"')