From 9d28210e0c31e9c69d169960afdb01a6c9d5855e Mon Sep 17 00:00:00 2001 From: rchan Date: Thu, 21 Sep 2023 09:10:00 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20need=20to=20have=20different=20clea?= =?UTF-8?q?r=5Fhistory=20commands=20for=20different=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slack_bot/slack_bot/bot/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slack_bot/slack_bot/bot/bot.py b/slack_bot/slack_bot/bot/bot.py index a7de810f..127b28c7 100644 --- a/slack_bot/slack_bot/bot/bot.py +++ b/slack_bot/slack_bot/bot/bot.py @@ -71,7 +71,7 @@ async def __call__(self, client: SocketModeClient, req: SocketModeRequest) -> No command = req.payload["command"] user_id = req.payload["user_id"] - if command == "/clear_history": + if command.startswith("/clear_history"): if self.model.mode == "chat": logging.info(f"Clearing {user_id}'s history") if self.model.chat_engine.get(user_id) is not None: