Skip to content

Commit 4e95ce5

Browse files
torvaldsQuantumChemist
authored andcommitted
fix: add error handling for handle_convo_llm to improve stability
1 parent 2af6334 commit 4e95ce5

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

bot.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,12 +2248,15 @@ async def on_message(self, message):
22482248
)
22492249
return
22502250

2251-
await handle_convo_llm(
2252-
message=message,
2253-
user_info=user_info,
2254-
bot=self.bot,
2255-
user_time=message_time,
2256-
)
2251+
try:
2252+
await handle_convo_llm(
2253+
message=message,
2254+
user_info=user_info,
2255+
bot=self.bot,
2256+
user_time=message_time,
2257+
)
2258+
except Exception as e:
2259+
print(f"Error in handle_convo_llm (openglados): {e}")
22572260
return
22582261

22592262
# Handle other messages in the server

0 commit comments

Comments
 (0)