Files
tw2/qingjian_cs/app/models.py
codex-bot a64378956a
Some checks failed
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_en (ubuntu-latest, 3.10) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_zh (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.12) (push) Has been cancelled
chore: initialize sandbox and overwrite remote content
2026-03-02 22:32:27 +08:00

31 lines
1017 B
Python

from __future__ import annotations
from dataclasses import dataclass
from typing import Literal
from pydantic import BaseModel, Field
class DecisionModel(BaseModel):
action: Literal["reply", "quote", "transfer", "noop", "update_state"] = Field(description="唯一动作")
reply: str = Field(default="", description="给客户的回复")
transfer_msg: str = Field(default="", description="转人工提示")
quote_mode: Literal["flush_pending", "analyze_current_or_recent", "collect_only", ""] = Field(default="")
state_patch: dict = Field(default_factory=dict, description="状态增量")
reason: str = Field(default="", description="内部原因")
class RouteModel(BaseModel):
route: Literal["pre_sales", "quote", "after_sales", "risk"] = Field(description="路由目标")
reason: str = Field(default="")
@dataclass
class Decision:
action: str
reply: str = ""
transfer_msg: str = ""
quote_mode: str = ""
state_patch: dict | None = None
reason: str = ""