post
Browse files- api/inference/router.py +15 -1
- api/requirements/router.py +13 -2
api/inference/router.py
CHANGED
|
@@ -8,6 +8,7 @@ from contextlib import asynccontextmanager
|
|
| 8 |
from fastapi import APIRouter
|
| 9 |
|
| 10 |
from api.schema import SuccessDetail
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
@asynccontextmanager
|
|
@@ -30,6 +31,19 @@ router = APIRouter(
|
|
| 30 |
)
|
| 31 |
async def home():
|
| 32 |
"""
|
| 33 |
-
|
| 34 |
"""
|
| 35 |
return {"success": "Welcome to the inference submodule!"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
from fastapi import APIRouter
|
| 9 |
|
| 10 |
from api.schema import SuccessDetail
|
| 11 |
+
from .schema import InferenceRequest
|
| 12 |
|
| 13 |
|
| 14 |
@asynccontextmanager
|
|
|
|
| 31 |
)
|
| 32 |
async def home():
|
| 33 |
"""
|
| 34 |
+
Inference home page.
|
| 35 |
"""
|
| 36 |
return {"success": "Welcome to the inference submodule!"}
|
| 37 |
+
|
| 38 |
+
@router.post(
|
| 39 |
+
"/match",
|
| 40 |
+
status_code=200,
|
| 41 |
+
response_model=SuccessDetail,
|
| 42 |
+
)
|
| 43 |
+
async def match(
|
| 44 |
+
inference: InferenceRequest,
|
| 45 |
+
):
|
| 46 |
+
"""
|
| 47 |
+
Match inference.
|
| 48 |
+
"""
|
| 49 |
+
return {"success": "Inference matched successfully!"}
|
api/requirements/router.py
CHANGED
|
@@ -8,7 +8,7 @@ from contextlib import asynccontextmanager
|
|
| 8 |
from fastapi import APIRouter
|
| 9 |
|
| 10 |
from api.schema import SuccessDetail
|
| 11 |
-
|
| 12 |
|
| 13 |
@asynccontextmanager
|
| 14 |
async def lifespan(app: APIRouter):
|
|
@@ -30,6 +30,17 @@ router = APIRouter(
|
|
| 30 |
)
|
| 31 |
async def home():
|
| 32 |
"""
|
| 33 |
-
|
| 34 |
"""
|
| 35 |
return {"success": "Welcome to the requirements submodule!"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
from fastapi import APIRouter
|
| 9 |
|
| 10 |
from api.schema import SuccessDetail
|
| 11 |
+
from .schema import RequirementsRequest
|
| 12 |
|
| 13 |
@asynccontextmanager
|
| 14 |
async def lifespan(app: APIRouter):
|
|
|
|
| 30 |
)
|
| 31 |
async def home():
|
| 32 |
"""
|
| 33 |
+
Requirements home page.
|
| 34 |
"""
|
| 35 |
return {"success": "Welcome to the requirements submodule!"}
|
| 36 |
+
|
| 37 |
+
@router.post(
|
| 38 |
+
"/create",
|
| 39 |
+
status_code=200,
|
| 40 |
+
response_model=SuccessDetail,
|
| 41 |
+
)
|
| 42 |
+
async def create_requirements(requirements: RequirementsRequest):
|
| 43 |
+
"""
|
| 44 |
+
Create requirements.
|
| 45 |
+
"""
|
| 46 |
+
return {"success": "Requirements created successfully!"}
|