mirror of
https://github.com/Laurent2916/nio-llm.git
synced 2024-11-23 22:58:48 +00:00
🐛 temporarily encapsulate message_callback's inside logic inside a try/catch
This commit is contained in:
parent
f92a20b2c5
commit
95c751ea30
|
@ -108,6 +108,7 @@ class LLMClient(AsyncClient):
|
||||||
event (`RoomMessageText`):
|
event (`RoomMessageText`):
|
||||||
The message event.
|
The message event.
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
logger.debug(f"New RoomMessageText: {event.source}")
|
logger.debug(f"New RoomMessageText: {event.source}")
|
||||||
|
|
||||||
# ignore messages pre-dating our spawn time
|
# ignore messages pre-dating our spawn time
|
||||||
|
@ -219,6 +220,8 @@ class LLMClient(AsyncClient):
|
||||||
|
|
||||||
# stop typing indicator loop
|
# stop typing indicator loop
|
||||||
typing_task.cancel()
|
typing_task.cancel()
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Exception in message_callback: {e}")
|
||||||
|
|
||||||
async def start(
|
async def start(
|
||||||
self,
|
self,
|
||||||
|
|
Loading…
Reference in a new issue