Remove trailing slash

This commit is contained in:
Andras Schmelczer 2022-07-03 13:55:10 +02:00
parent 4f59a53af5
commit 64f260ab1c

View file

@ -183,13 +183,14 @@ class GreatAI(Generic[T]):
def _bootstrap_prediction_endpoint(self) -> None:
router = APIRouter(
prefix="/predict",
tags=["predictions"],
)
schema = self._get_schema()
@router.post("/", status_code=status.HTTP_200_OK, response_model=Trace[T])
@router.post(
"/predict", status_code=status.HTTP_200_OK, response_model=Trace[T]
)
@use_http_exceptions
def predict(input_value: schema) -> Trace[T]: # type: ignore
return self(**cast(BaseModel, input_value).dict())