mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-25 22:54:29 +00:00
apps/simplex-llm-bot: graceful shutdown
This commit is contained in:
@@ -6,6 +6,7 @@ from collections import defaultdict
|
||||
import traceback
|
||||
import os
|
||||
import time
|
||||
import logging
|
||||
|
||||
chat_histories = defaultdict(list)
|
||||
|
||||
@@ -146,4 +147,7 @@ if __name__ == "__main__":
|
||||
await live_msg.finish_live()
|
||||
|
||||
# Start the bot
|
||||
asyncio.run(bot.start())
|
||||
try:
|
||||
asyncio.run(bot.start())
|
||||
except KeyboardInterrupt:
|
||||
logging.info("Exiting")
|
||||
|
||||
Reference in New Issue
Block a user