确定运输方式前的多句询价带到所选方式并按该方式抽字段;成交已定后放舱不再推跟进,未成交原因不再被当成新询价。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-03 09:54:33 +08:00
co-authored by Cursor
parent d989154485
commit 0a14b4cc15
18 changed files with 620 additions and 28 deletions
+6 -1
View File
@@ -275,10 +275,15 @@ def _merge_spoken_collab(text: str, facts: dict[str, str]) -> dict[str, str]:
不覆盖已有询价键。不拿去补问、不挡查价。
"""
from agent.schema.field_validate import harvest_oral_collab, normalize_facts
from agent.schema.field_validate import (
harvest_oral_collab,
harvest_spoken_trade_term,
normalize_facts,
)
merged = dict(facts or {})
extra = dict(harvest_oral_collab(text))
extra.update(harvest_spoken_trade_term(text))
extra.update(normalize_facts(harvest_collab_labels(text)))
for key, val in extra.items():
if val and not str(merged.get(key) or "").strip():
@@ -34,6 +34,7 @@ _FIELD_KEYS = (
"车型/数量",
"车型数量",
"通关口岸",
"贸易条款",
)
@@ -131,6 +132,7 @@ def build_extract_messages(text: str) -> list[dict[str, str]]:
"询价日期、走货日期、询价时间、走货时间、发货时间、发货日期、出货日期、出货时间、提货时间、提货日期一律写入报价日期。"
"货好时间、提货地址不要写成报价日期。"
"陆运「通关口岸:皇岗」「通关口岸皇岗」「过皇岗」有说就写入通关口岸,没说留空,禁止编造口岸。"
"原话单独出现 DAP、DDP、CIF、CIP、FOB、EXW 时写入贸易条款;没出现留空,禁止编造。"
"「从南京飞吉隆坡」起运港=南京、目的港=吉隆坡;「北京飞吉隆坡」起运港=北京。"
"原话是机场三字码或航线就原样记,禁止翻译成城市名:"
"SZX-CGK / SZX/CGK / SZX到CGK → 起运港=SZX、目的港=CGK,不要写成深圳、雅加达。"