Output the final answer in the log

This commit is contained in:
OK 2023-04-10 14:41:57 +02:00
parent 961e70f17e
commit d29595136f

View File

@ -233,7 +233,8 @@ class AIResponder(object):
if 'hack' not in response or type(response.get('picture', None)) not in (type(None), str): if 'hack' not in response or type(response.get('picture', None)) not in (type(None), str):
retries -= 1 retries -= 1
continue continue
logging.info(f"got this answer:\n{pp(response)}")
self.update_history(messages[-1], answer, limit) self.update_history(messages[-1], answer, limit)
return await self.post_process(message, response) answer_message = await self.post_process(message, response)
logging.info(f"got this answer:\n{str(answer_message)}")
return answer_message
raise RuntimeError("Failed to generate answer after multiple retries") raise RuntimeError("Failed to generate answer after multiple retries")