确定运输方式前的多句询价带到所选方式并按该方式抽字段;成交已定后放舱不再推跟进,未成交原因不再被当成新询价。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -79,6 +79,25 @@ def looks_like_lost_outcome(text: str) -> bool:
|
||||
return any(token in blob for token in _LOST_MARKERS)
|
||||
|
||||
|
||||
def spoken_deal_status(text: str) -> str:
|
||||
"""
|
||||
私聊口播成交结果。先认未成交,再认已成交、协商中。
|
||||
|
||||
「WO202609240006已成交」整句就是要关单,不是再打开成交卡。
|
||||
问句(已成交吗)不算。对不上返回空串。
|
||||
"""
|
||||
blob = (text or "").replace(" ", "")
|
||||
if not blob or blob[-1] in _QUESTION_TAILS:
|
||||
return ""
|
||||
if looks_like_lost_outcome(blob):
|
||||
return "未成交"
|
||||
if "已成交" in blob:
|
||||
return "已成交"
|
||||
if "协商中" in blob:
|
||||
return "协商中"
|
||||
return ""
|
||||
|
||||
|
||||
def notify_app_ready() -> bool:
|
||||
"""询价消息服务已配 AgentId+Secret 才推。空则只成交不推。"""
|
||||
settings = get_settings()
|
||||
|
||||
Reference in New Issue
Block a user