fix: await

This commit is contained in:
Jeremy Yin 2024-03-18 15:58:50 +08:00
parent 605f84688e
commit ded25029ee
1 changed files with 2 additions and 2 deletions

View File

@ -14,9 +14,9 @@ class ChatService:
self.pvd = providers self.pvd = providers
async def get_ai_chat_response(self, req: GetAiChatResponseInput) -> GetAiChatResponseOutput: async def get_ai_chat_response(self, req: GetAiChatResponseInput) -> GetAiChatResponseOutput:
if self.pvd.chat.check_user_message_limited_in_30_seconds(self.ctx.user.id): if await self.pvd.chat.check_user_message_limited_in_30_seconds(self.ctx.user.id):
raise MessageLimitedIn30SecondsError() raise MessageLimitedIn30SecondsError()
if self.pvd.chat.check_user_message_limited_in_daily(self.ctx.user.id): if await self.pvd.chat.check_user_message_limited_in_daily(self.ctx.user.id):
raise MessageLimitedInDailyError() raise MessageLimitedInDailyError()
request_content = req.message request_content = req.message