refactor: 重命名 agent_chat 模块为 agent
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from v1.agent.dependencies import get_agent_service
|
||||
from v1.agent.schemas import AgentChatRunRequest, AgentChatRunResponse
|
||||
from v1.agent.service import AgentChatService
|
||||
|
||||
router = APIRouter(prefix="/agent", tags=["agent"])
|
||||
|
||||
|
||||
@router.post("", response_model=AgentChatRunResponse)
|
||||
async def run_agent_chat(
|
||||
payload: AgentChatRunRequest,
|
||||
service: Annotated[AgentChatService, Depends(get_agent_service)],
|
||||
) -> AgentChatRunResponse:
|
||||
return await service.run(payload)
|
||||
Reference in New Issue
Block a user