Output the returned answer from ai to log
This commit is contained in:
parent
6b70292040
commit
7c029038f6
@ -176,6 +176,7 @@ class AIResponder(object):
|
||||
answer = result['choices'][0]['message']
|
||||
if type(answer) != dict:
|
||||
answer = answer.to_dict()
|
||||
logging.info(f"generated response: {repr(answer)}")
|
||||
return answer, limit
|
||||
except openai.error.InvalidRequestError as err:
|
||||
if 'maximum context length is' in str(err) and limit > 4:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user