Fix W|A bug and improve error message

This commit is contained in:
Tanner Collin 2022-09-09 16:16:31 -06:00
parent 9283a34bea
commit dbc6bc0f43

View File

@ -147,7 +147,7 @@ def think_send(query):
if len(result) > 500:
result = result[:500] + '... truncated.'
elif len(result) == 0 and not img_url:
elif len(result) == 0:
result = 'Error'
result = result.replace('Wolfram|Alpha', 'Protovac')
@ -163,6 +163,9 @@ def think_send(query):
if '(although' in result:
result = result.split('(although')[0]
if result == 'Error':
result = 'INSUFFICIENT DATA FOR A MEANINGFUL ANSWER.'
return result
skip_input = False