26 lines
637 B
Python
26 lines
637 B
Python
"""
|
|
RouteDecision 值对象。
|
|
|
|
本文件只放冻结路由结论;解析逻辑见 ordered_actions.py;副作用在 handlers。
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
from typing import Any
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class RouteDecision:
|
|
"""
|
|
唯一路由结论(一条入站对应一个)。
|
|
|
|
intent:如 ordinary_text_inquiry / attachment_inquiry / reject_no_sender
|
|
thread_id:继续本单时填工单号;新开可空由 Handler 生成。
|
|
"""
|
|
|
|
intent: str
|
|
thread_id: str = ""
|
|
confidence: float = 0.0
|
|
raw: dict[str, Any] = field(default_factory=dict)
|