员工岗位可重新启用;调价认空运航线;会话存档跳号补拉;陆运报价按车型列回填
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -96,6 +96,18 @@ _CONFIRM_CHOICE = {
|
||||
"沿用tms",
|
||||
"沿用tms报价",
|
||||
}
|
||||
# 解散相近说法。禁止只认整句「解散群」,模型失败时也要能清群。
|
||||
_DISSOLVE_HINTS = (
|
||||
"解散群",
|
||||
"解散这个群",
|
||||
"解散该群",
|
||||
"把群解散",
|
||||
"这个群解散",
|
||||
"群解散吧",
|
||||
"解散吧",
|
||||
"清群",
|
||||
"散群",
|
||||
)
|
||||
_CONFIRM_HINTS = (
|
||||
"确认报价",
|
||||
"确认该报价",
|
||||
@@ -195,6 +207,10 @@ def classify_group_text(
|
||||
exact = _exact_tms_choice(raw)
|
||||
if exact:
|
||||
return exact
|
||||
# 先认解散口令:避免模型关/失败时「解散群」掉进 other 静默无反应。
|
||||
hinted_dissolve = _hint_dissolve(raw)
|
||||
if hinted_dissolve:
|
||||
return hinted_dissolve
|
||||
try:
|
||||
from agent.config import get_settings
|
||||
|
||||
@@ -303,6 +319,22 @@ def _hint_deal_outcome(text: str) -> str:
|
||||
return ""
|
||||
|
||||
|
||||
def _hint_dissolve(text: str) -> str:
|
||||
"""
|
||||
要把协同群解散。口令不写死整句「解散群」。
|
||||
|
||||
含金额的报价句不走这里(上层已先抽价)。整句很短且像清群时认。
|
||||
"""
|
||||
blob = _norm_intent_text(text)
|
||||
if not blob:
|
||||
return ""
|
||||
if any(x in blob for x in _DISSOLVE_HINTS):
|
||||
return INTENT_DISSOLVE
|
||||
if "解散" in blob and "群" in blob:
|
||||
return INTENT_DISSOLVE
|
||||
return ""
|
||||
|
||||
|
||||
def _classify_with_model(text: str, settings) -> str:
|
||||
"""DeepSeek 只回一个意图词。失败空串。"""
|
||||
from agent.llm.http_client import LlmHttpClient
|
||||
|
||||
Reference in New Issue
Block a user