update
This commit is contained in:
parent
e2e68ccd8b
commit
551efd5d80
@ -236,8 +236,10 @@ async def chat(request: ChatRequest,
|
|||||||
)
|
)
|
||||||
|
|
||||||
# 扣除用户积分
|
# 扣除用户积分
|
||||||
manager = UserManager(session)
|
print(f"current_user: {current_user}")
|
||||||
manager.consume_user_points(current_user["id"], 20)
|
if current_user['level'] < 2:
|
||||||
|
manager = UserManager(session)
|
||||||
|
manager.consume_user_points(current_user["id"], 20)
|
||||||
|
|
||||||
# 获取response的stream
|
# 获取response的stream
|
||||||
def stream_response():
|
def stream_response():
|
||||||
|
|||||||
@ -29,7 +29,7 @@ services:
|
|||||||
cryptoai-api:
|
cryptoai-api:
|
||||||
build: .
|
build: .
|
||||||
container_name: cryptoai-api
|
container_name: cryptoai-api
|
||||||
image: cryptoai-api:0.1.39
|
image: cryptoai-api:0.1.40
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user