turing-space / turing /api /schemas.py
github-actions[bot]
Sync turing folder from GitHub
66e683e
raw
history blame contribute delete
576 Bytes
from typing import Any, List
from pydantic import BaseModel, Field
# Input Schema
class PredictionRequest(BaseModel):
texts: List[str] = Field(
...,
description="List of code comments to classify",
example=["public void main", "def init self"],
)
# Output Schema
class PredictionResponse(BaseModel):
predictions: List[Any] = Field(..., description="List of predicted labels")
labels: List[Any] = Field(..., description="List of human-readable labels")
model_info: dict = Field(..., description="Metadata about the model used")