This commit is contained in:
aaron 2025-06-04 10:37:47 +08:00
parent e2e68ccd8b
commit 551efd5d80
2 changed files with 5 additions and 3 deletions

View File

@ -236,8 +236,10 @@ async def chat(request: ChatRequest,
)
# 扣除用户积分
manager = UserManager(session)
manager.consume_user_points(current_user["id"], 20)
print(f"current_user: {current_user}")
if current_user['level'] < 2:
manager = UserManager(session)
manager.consume_user_points(current_user["id"], 20)
# 获取response的stream
def stream_response():

View File

@ -29,7 +29,7 @@ services:
cryptoai-api:
build: .
container_name: cryptoai-api
image: cryptoai-api:0.1.39
image: cryptoai-api:0.1.40
restart: always
ports:
- "8000:8000"