Skip to content

Commit eca0599

Browse files
committed
Fix colab code
1 parent 53eebec commit eca0599

2 files changed

Lines changed: 2550 additions & 953 deletions

File tree

discord_bot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ async def on_message(self, message):
6565
# we may get ill-formed response if the model hasn't fully loaded
6666
# or has timed out
6767
if not bot_response:
68-
bot_response = 'Hmm... something is not right.'
68+
if 'error' in response:
69+
bot_response = '`Error: {}`'.format(response['error'])
70+
else:
71+
bot_response = 'Hmm... something is not right.'
6972

7073
# send the model's response to the Discord channel
7174
await message.channel.send(bot_response)

0 commit comments

Comments
 (0)