feat: add ML service response schemas
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
37831ba717
commit
ca9cbb12bf
@@ -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]
|
||||
Reference in New Issue
Block a user