Files
health-service/routers/agent.py
2026-09-03 17:25:06 +08:00

32 lines
656 B
Python

from fastapi import APIRouter
from schema.agent import ReportRequest
from service import agent_service
router = APIRouter(prefix="/agent", tags=["Agent"])
@router.post("/tip/generate")
def generate_tip():
return agent_service.query_tip_agent()
@router.get("/tip/latest")
def latest_tip():
return agent_service.get_latest_tip()
@router.post("/recipe/generate")
def generate_recipe():
return agent_service.query_recipe_agent()
@router.get("/recipe/latest")
def latest_recipe():
return agent_service.get_latest_recipe()
@router.post("/report")
def query_report(req: ReportRequest):
return agent_service.query_report_agent(req)