File size: 1,232 Bytes
7350ff1 18ddfa2 7350ff1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 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.")
|