落地陆运私聊文字询价:选项核对后再建单查价,并按线路拉产品进群。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -77,6 +77,21 @@ class IntentRouter:
|
||||
kind = (event or "").strip().lower()
|
||||
if kind in {"template_card_event", "click", "templatecardevent"}:
|
||||
return RouteDecision(intent="card_action", confidence=1.0)
|
||||
from agent.handlers.text_inquiry import is_land_confirm_action
|
||||
from agent.channel.wecom.models import InboundMessage
|
||||
from agent.schema.land_options import looks_like_confirm
|
||||
|
||||
if looks_like_confirm(text or ""):
|
||||
if is_land_confirm_action(
|
||||
InboundMessage(
|
||||
sender_id=sender_id,
|
||||
content=text or "",
|
||||
message_id="route-land-confirm",
|
||||
)
|
||||
):
|
||||
logger.info("route 陆运核对卡确定:跳过闲聊模型 sender=%s", sender_id)
|
||||
return RouteDecision(intent="ordinary_text_inquiry", confidence=1.0)
|
||||
logger.info("route 确定类短句但无陆运核对卡,仍走模型 sender=%s", sender_id)
|
||||
return self.route(text=text, sender_id=sender_id)
|
||||
|
||||
def enqueue_ordered_actions(
|
||||
|
||||
Reference in New Issue
Block a user