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}"')