Output the final answer in the log
This commit is contained in:
parent
961e70f17e
commit
d29595136f
@ -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")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user