feat: add ML service response schemas

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Asep Haryana Saputra
2026-05-22 19:28:43 +00:00
co-authored by Claude Opus 4.7
parent 37831ba717
commit ca9cbb12bf
+21
View File
@@ -0,0 +1,21 @@
from pydantic import BaseModel
class HealthResponse(BaseModel):
status: str
model_loaded: bool
class MetadataResponse(BaseModel):
service_name: str
service_version: str
model_path: str
model_loaded: bool
input_size: int
labels: list[str]
class PredictionResponse(BaseModel):
label: str
confidence: float
probabilities: dict[str, float]