完善牧安云哨-后端
This commit is contained in:
@@ -17,7 +17,7 @@ serviceRouter = APIRouter()
|
||||
|
||||
# 对话列表
|
||||
@serviceRouter.get("/sessionsForService")
|
||||
def getSessions(user_id: UUID = Depends(get_user_id_from_token)):
|
||||
async def getSessions(user_id: UUID = Depends(get_user_id_from_token)):
|
||||
if not user_id:
|
||||
return {"error": "userId is required"}
|
||||
return BaseResponse(data=pg.get_sessions(user_id, "service"))
|
||||
@@ -25,7 +25,7 @@ def getSessions(user_id: UUID = Depends(get_user_id_from_token)):
|
||||
|
||||
# 对话
|
||||
@serviceRouter.post("/chatForService")
|
||||
def chat(req: ChatRequest, user_id: UUID = Depends(get_user_id_from_token)):
|
||||
async def chat(req: ChatRequest, user_id: UUID = Depends(get_user_id_from_token)):
|
||||
if not user_id:
|
||||
return {"error": "userId is required"}
|
||||
if not req.aiId:
|
||||
|
||||
Reference in New Issue
Block a user