Spaces:
Runtime error
Runtime error
远兮
commited on
Commit
·
fa2748e
1
Parent(s):
b475f6f
次数校验
Browse files
chatgpt-next-web/service.py
CHANGED
@@ -420,7 +420,7 @@ def validate():
|
|
420 |
|
421 |
# 获取用户套餐信息
|
422 |
package = get_user_package(user_id)
|
423 |
-
if not package
|
424 |
return jsonify({'code': 400, 'message': '聊天次数已用完,请购买套餐'})
|
425 |
|
426 |
# 检查用户聊天次数是否超过限制
|
@@ -446,8 +446,8 @@ def proxy_chat_completions():
|
|
446 |
|
447 |
# 获取用户套餐信息
|
448 |
package = get_user_package(user_id)
|
449 |
-
if not package:
|
450 |
-
return jsonify({'code': 400, 'message': '
|
451 |
|
452 |
# 检查用户聊天次数是否超过限制
|
453 |
if exceeded_chat_limit(user_id, package, model):
|
|
|
420 |
|
421 |
# 获取用户套餐信息
|
422 |
package = get_user_package(user_id)
|
423 |
+
if not package and get_free_count(user_id) <= 0:
|
424 |
return jsonify({'code': 400, 'message': '聊天次数已用完,请购买套餐'})
|
425 |
|
426 |
# 检查用户聊天次数是否超过限制
|
|
|
446 |
|
447 |
# 获取用户套餐信息
|
448 |
package = get_user_package(user_id)
|
449 |
+
if not package and get_free_count(user_id) <= 0:
|
450 |
+
return jsonify({'code': 400, 'message': '聊天次数已用完,请购买套餐'})
|
451 |
|
452 |
# 检查用户聊天次数是否超过限制
|
453 |
if exceeded_chat_limit(user_id, package, model):
|