feat: soften quota messaging
This commit is contained in:
@@ -226,7 +226,10 @@ class ChatService:
|
||||
@staticmethod
|
||||
def _ensure_quota(user: User) -> None:
|
||||
if user.daily_chat_used >= user.daily_chat_limit:
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail="今日提问次数已用完")
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="今天的陪伴对话已经比较多了,建议先消化当前回答和功课;如需继续使用,可以联系运营老师确认权益。",
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _ensure_topic_quota(db: Session, user: User, session: ChatSession, entitlement) -> None:
|
||||
|
||||
Reference in New Issue
Block a user