fix logging

This commit is contained in:
Cyberes 2023-03-18 15:08:34 -06:00
parent 0732c1bbec
commit 9f5475db75
1 changed files with 2 additions and 0 deletions

View File

@ -211,6 +211,8 @@ async def process_chat(client, room, event, command, store, openai, thread_root_
z = text_response.replace("\n", "\\n") z = text_response.replace("\n", "\\n")
if isinstance(command, str): if isinstance(command, str):
x = command.replace("\n", "\\n") x = command.replace("\n", "\\n")
elif isinstance(command, list):
x = command[-1]['content'].replace("\n", "\\n")
else: else:
x = command x = command
logger.info(f'Reply to {event.event_id} --> "{x}" and bot responded with "{z}"') logger.info(f'Reply to {event.event_id} --> "{x}" and bot responded with "{z}"')