feat: 初始化工程
This commit is contained in:
5
routers/__init__.py
Normal file
5
routers/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from .agent import router as agent_router
|
||||
|
||||
routers = [
|
||||
agent_router
|
||||
]
|
||||
15
routers/agent.py
Normal file
15
routers/agent.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
from service import agent_service
|
||||
|
||||
router = APIRouter(prefix="/agent", tags=["Agent"])
|
||||
|
||||
|
||||
@router.post("/tip/generate")
|
||||
def generate_tip():
|
||||
return agent_service.generate_tip_agent()
|
||||
|
||||
|
||||
@router.get("/tip/latest")
|
||||
def latest_tip():
|
||||
return agent_service.get_latest_tip()
|
||||
Reference in New Issue
Block a user