from __future__ import annotations from typing import List from pydantic import BaseModel, Field, conint class CallSummary(BaseModel): summary: str = Field(..., description="A concise call summary.") key_points: List[str] = Field( default_factory=list, description="A short list of the most important takeaways from the call.", ) action_items: List[str] = Field( default_factory=list, description="Concrete follow-up actions with an owner when possible.", ) tags: List[str] = Field( default_factory=list, description="Short topic tags (e.g., billing, outage, refund).", ) highlights: List[str] = Field( default_factory=list, description="Notable highlights or quotes from the call.", ) class QualityScores(BaseModel): tone: conint(ge=0, le=10) = Field(..., description="Tone score from 0 to 10.") professionalism: conint(ge=0, le=10) = Field( ..., description="Professionalism score from 0 to 10." ) structured_resolution: conint(ge=0, le=10) = Field( ..., description="Structured resolution score from 0 to 10." ) notes: str = Field(..., description="Brief rationale for the scores.")