chore: finalize backend feature scope
This commit is contained in:
+1
-15
@@ -8,7 +8,6 @@ from app.db.session import get_db
|
||||
from app.schemas.evaluation import CreateEvaluationRequest, EvaluationResponse
|
||||
from app.schemas.session import (
|
||||
ChatRequest,
|
||||
ChatResponse,
|
||||
CreateOrderRequest,
|
||||
CreateOrderResponse,
|
||||
CreateSessionRequest,
|
||||
@@ -41,19 +40,6 @@ def create_session(
|
||||
return ok(result)
|
||||
|
||||
|
||||
@router.post("/{session_id}/chat", response_model=ApiResponse[ChatResponse])
|
||||
async def chat(
|
||||
session_id: int,
|
||||
payload: ChatRequest,
|
||||
ctx: UserContext = Depends(get_user_context),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
"""非流式问诊:发送医生问题并返回 AI 病人回复。"""
|
||||
result = await SessionService(db).chat(ctx, session_id, payload.message)
|
||||
db.commit()
|
||||
return ok(result)
|
||||
|
||||
|
||||
@router.post("/{session_id}/chat/stream", response_class=StreamingResponse)
|
||||
async def chat_stream(
|
||||
session_id: int,
|
||||
@@ -117,7 +103,7 @@ async def generate_hints(
|
||||
ctx: UserContext = Depends(get_user_context),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
"""新手模式提示:根据当前问诊上下文生成缺失维度和下一步问题。"""
|
||||
"""练习提示:根据当前问诊上下文生成缺失维度和下一步问题。"""
|
||||
result = await SessionService(db).generate_hints(ctx, session_id, payload)
|
||||
db.commit()
|
||||
return ok(result)
|
||||
|
||||
Reference in New Issue
Block a user