16 lines
499 B
Python
16 lines
499 B
Python
from fastapi import APIRouter
|
|
|
|
from app.schemas.chat import ChatRequest, ChatResponse
|
|
|
|
router = APIRouter(tags=["chat"])
|
|
|
|
|
|
@router.post("/chat", response_model=ChatResponse)
|
|
def chat(payload: ChatRequest) -> ChatResponse:
|
|
# TODO: retrieval -> context assembly -> LLM -> evidence/source checks
|
|
return ChatResponse(
|
|
answer=f"已收到问题:{payload.question}。当前为基础壳子,尚未接入知识检索或大语言模型。",
|
|
status="stub",
|
|
sources=[],
|
|
)
|