Refactor: Remove unnecessary awaits from clear and abort_processing methods

This commit is contained in:
cyclop-bot
2025-06-02 15:21:06 -05:00
parent c6c8e3ce37
commit 9715e3767f
+3 -3
View File
@@ -116,16 +116,16 @@ class OpenAICompatibleInferenceBot(BaseTelegramInferenceBot):
async def start(self): async def start(self):
logging.info(f"{self.__class__.__name__} started.") logging.info(f"{self.__class__.__name__} started.")
async def clear(self, user_id): def clear(self, user_id):
super().clear_conversation_history(user_id) super().clear_conversation_history(user_id)
async def abort_processing(self, user_id): async def abort_processing(self, user_id):
if user_id in self.processing_status: if user_id in self.processing_status:
self.processing_status[user_id]["processing"] = False self.processing_status[user_id]["processing"] = False
await self.clear(user_id) self.clear(user_id)
return "Processing aborted and conversation cleared." return "Processing aborted and conversation cleared."
else: else:
await self.clear(user_id) self.clear(user_id)
return "No active processing found to abort. Conversation cleared." return "No active processing found to abort. Conversation cleared."
@abstractmethod @abstractmethod