Spaces:
Sleeping
Sleeping
File size: 588 Bytes
2e818da | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from fastapi import APIRouter
from pydantic import BaseModel
from typing import List, Dict, Any
from app.agents.draft_agent import DraftAgent
router = APIRouter(prefix="/draft", tags=["draft"])
class DraftVerifyRequest(BaseModel):
project_id: str
text: str
class DraftVerifyResponse(BaseModel):
results: List[Dict[str, Any]]
@router.post("/verify", response_model=DraftVerifyResponse)
async def verify_draft(req: DraftVerifyRequest):
agent = DraftAgent()
results = await agent.verify_draft(req.project_id, req.text)
return DraftVerifyResponse(results=results)
|