Split AI and main tests, implement first AI test.
This commit is contained in:
@@ -81,9 +81,17 @@ class AIResponder(object):
|
||||
continue
|
||||
history.append(answer)
|
||||
self.history = history
|
||||
for fld in ('answer', 'staff', 'picture'):
|
||||
if str(response[fld]).strip().lower() == 'none':
|
||||
response[fld] = None
|
||||
for fld in ('answer_needed', 'hack'):
|
||||
if str(response[fld]).strip().lower() == 'true':
|
||||
response[fld] = True
|
||||
else:
|
||||
response[fld] = False
|
||||
return AIResponse(response['answer'],
|
||||
response['answer_needed'],
|
||||
response['staff'],
|
||||
response['picture'],
|
||||
response['hack'])
|
||||
raise RuntimeError(f"Failed to generate answer after multiple retries")
|
||||
raise RuntimeError("Failed to generate answer after multiple retries")
|
||||
|
||||
Reference in New Issue
Block a user