角色业务范围收紧工单与模板;报价日期不当费用;未选舱不迁已报价;另开一票可清违禁 hold
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -135,8 +135,11 @@ def build_extract_messages(text: str) -> list[dict[str, str]]:
|
||||
"陆运「通关口岸:皇岗」「通关口岸皇岗」「过皇岗」有说就写入通关口岸,没说留空,禁止编造口岸。"
|
||||
"原话单独出现 DAP、DDP、CIF、CIP、FOB、EXW 时写入贸易条款;没出现留空,禁止编造。"
|
||||
"「从南京飞吉隆坡」起运港=南京、目的港=吉隆坡;「北京飞吉隆坡」起运港=北京。"
|
||||
"「货交上海」「货交:上海」「货交到上海」是提货地址=上海,不是起运港。"
|
||||
"没有另写起运地、三字码航线或「从哪飞/到」时,起运港必须空串。"
|
||||
"陆运口语「广州到深圳」「广东省深圳市福田区到香港」→起运港=左侧地名、目的港=右侧地名;"
|
||||
"不要把左侧写成提货地址,右侧目的地也不能丢。"
|
||||
"「货交上海」「货交:上海」「货交到上海」才是提货地址=上海,不是起运港。"
|
||||
"仅空运且只有「货交…」、没有另写起运地/三字码航线/「从哪飞」时,起运港必须空串;"
|
||||
"陆运「A到B」必须写入起运港和目的港。"
|
||||
"原话是机场三字码或航线就原样记,禁止翻译成城市名:"
|
||||
"SZX-CGK / SZX/CGK / SZX到CGK → 起运港=SZX、目的港=CGK,不要写成深圳、雅加达。"
|
||||
"换城市必须覆盖旧值,不要沿用上一句的港口。"
|
||||
@@ -214,4 +217,35 @@ def invoke_extract_fields(
|
||||
parsed.get("business_line") or "-",
|
||||
sorted((parsed.get("facts") or {}).keys()),
|
||||
)
|
||||
# #region agent log
|
||||
try:
|
||||
import json
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
_facts = dict(parsed.get("facts") or {})
|
||||
_log = {
|
||||
"sessionId": "0593f5",
|
||||
"runId": "post-fix",
|
||||
"hypothesisId": "A",
|
||||
"location": "mode_extract_fields.py:invoke_extract_fields",
|
||||
"message": "DeepSeek B place fields",
|
||||
"data": {
|
||||
"text_head": (text or "")[:80],
|
||||
"ok": parsed.get("ok"),
|
||||
"business_line": parsed.get("business_line"),
|
||||
"land_subtype": parsed.get("land_subtype"),
|
||||
"起运港": _facts.get("起运港"),
|
||||
"目的港": _facts.get("目的港"),
|
||||
"提货地址": _facts.get("提货地址"),
|
||||
"fact_keys": sorted(_facts.keys()),
|
||||
},
|
||||
"timestamp": int(time.time() * 1000),
|
||||
}
|
||||
Path(__file__).resolve().parents[3].joinpath("debug-0593f5.log").open(
|
||||
"a", encoding="utf-8"
|
||||
).write(json.dumps(_log, ensure_ascii=False) + "\n")
|
||||
except Exception:
|
||||
pass
|
||||
# #endregion
|
||||
return parsed
|
||||
|
||||
Reference in New Issue
Block a user