Remove trailing slash
This commit is contained in:
parent
2ccebaec8c
commit
647e448092
1 changed files with 3 additions and 2 deletions
|
|
@ -183,13 +183,14 @@ class GreatAI(Generic[T]):
|
||||||
|
|
||||||
def _bootstrap_prediction_endpoint(self) -> None:
|
def _bootstrap_prediction_endpoint(self) -> None:
|
||||||
router = APIRouter(
|
router = APIRouter(
|
||||||
prefix="/predict",
|
|
||||||
tags=["predictions"],
|
tags=["predictions"],
|
||||||
)
|
)
|
||||||
|
|
||||||
schema = self._get_schema()
|
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
|
@use_http_exceptions
|
||||||
def predict(input_value: schema) -> Trace[T]: # type: ignore
|
def predict(input_value: schema) -> Trace[T]: # type: ignore
|
||||||
return self(**cast(BaseModel, input_value).dict())
|
return self(**cast(BaseModel, input_value).dict())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue