diff --git a/backend/app/api/routes/utils.py b/backend/app/api/routes/utils.py index fc09341..864e8e4 100644 --- a/backend/app/api/routes/utils.py +++ b/backend/app/api/routes/utils.py @@ -29,3 +29,17 @@ def test_email(email_to: EmailStr) -> Message: @router.get("/health-check/") async def health_check() -> bool: return True + +class ClassifyRequest(BaseModel): + text: str + +@router.post("/bentoml_classifiy") +async def bentoml_classifiy(data: ClassifyRequest): + async with httpx.AsyncClient() as client: + response = await client.post( + "http://localhost:3000/classify", + json={"text": "data.text"} + ) + result = response.json() + + return result