[Eva] Учитель AI: usage/limit при исчерпании лимита
This commit is contained in:
+4
-1
@@ -1005,10 +1005,13 @@ async def teacher_free_message(request: Request):
|
||||
lang = await get_user_lang(conn, telegram_id)
|
||||
|
||||
if not await check_ai_limit(conn, telegram_id):
|
||||
usage = await get_teacher_ai_usage(conn, telegram_id)
|
||||
return {
|
||||
"response": "",
|
||||
"limit_exceeded": True,
|
||||
"message": get_ai_limit_message(lang)
|
||||
"message": get_ai_limit_message(lang),
|
||||
"usage": usage,
|
||||
"limit": TEACHER_AI_DAILY_LIMIT,
|
||||
}
|
||||
|
||||
context_parts = []
|
||||
|
||||
Reference in New Issue
Block a user