ticketsense-demo / api /schema.py
Grinding's picture
Upload api/schema.py with huggingface_hub
6bd7794 verified
raw
history blame contribute delete
496 Bytes
from pydantic import BaseModel, Field
from typing import Literal
Sentiment = Literal["positive", "neutral", "negative"]
Urgency = Literal["low", "medium", "high"]
Category = Literal["billing", "technical", "account", "feature_request", "other"]
class TriageRequest(BaseModel):
text: str = Field(..., min_length=1, max_length=4000)
class TriageResponse(BaseModel):
sentiment: Sentiment
urgency: Urgency
category: Category
confidence: float = Field(..., ge=0.0, le=1.0)