modelbuilderhq's picture
Upload folder using huggingface_hub
2ade2c6 verified
"""Shared task structures for SupportDesk."""
from __future__ import annotations
from dataclasses import dataclass
from typing import Literal
from models import KnowledgeSnippet, SupportTicket
ALL_QUEUES = [
"billing_ops",
"trust_and_safety",
"platform_engineering",
"compliance_ops",
"general_support",
]
ALL_PRIORITIES = ["low", "normal", "high", "urgent"]
ALL_STATUSES = ["new", "waiting_on_customer", "resolved", "escalated"]
ALL_ISSUE_TYPES = [
"duplicate_charge",
"account_compromise",
"production_incident",
"regulated_exception",
"general_question",
]
@dataclass(frozen=True)
class SupportTaskSpec:
task_id: str
difficulty: Literal["easy", "medium", "hard"]
title: str
objective: str
ticket: SupportTicket
knowledge_base: tuple[KnowledgeSnippet, ...]
gold_queue: str
gold_priority: str
gold_issue_type: str
gold_status: str
gold_resolution_code: str
required_requested_fields: tuple[str, ...]
required_reply_markers: tuple[tuple[str, ...], ...]
required_note_markers: tuple[tuple[str, ...], ...]
forbidden_reply_markers: tuple[str, ...] = ()
risk_flags: tuple[str, ...] = ()
follow_up_outcome: Literal["none", "partial", "complete", "incorrect"] = "none"
follow_up_message: str = ""
follow_up_provided_fields: tuple[str, ...] = ()
follow_up_wrong_fields: tuple[str, ...] = ()
sla_step_cost: int = 15
over_escalation_queues: tuple[str, ...] = ()
under_escalation_deadline_step: int | None = None
max_steps: int = 6
__all__ = [
"SupportTaskSpec",
"KnowledgeSnippet",
"SupportTicket",
"ALL_QUEUES",
"ALL_PRIORITIES",
"ALL_STATUSES",
"ALL_ISSUE_TYPES",
]