[Eva] Учитель AI: usage/limit в ответе free-message

This commit is contained in:
2026-11-03 18:06:38 +00:00
parent f4f02f7078
commit 5f72bfee6a
+4 -1
View File
@@ -1041,7 +1041,10 @@ async def teacher_free_message(request: Request):
async with pool.acquire() as conn:
await increment_teacher_ai_usage(conn, telegram_id)
return {"response": ai_response}
async with pool.acquire() as conn:
usage = await get_teacher_ai_usage(conn, telegram_id)
return {"response": ai_response, "usage": usage, "limit": TEACHER_AI_DAILY_LIMIT}
@router.post("/diagnostic-test")