机器人显示名与站点标题可配;多段联运列表投影;协同群监听对账;工单附件落存;模板与工单后台补强

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-10-19 09:41:59 +08:00
co-authored by Cursor
parent 277cdc1c28
commit 2b528758b4
119 changed files with 6760 additions and 3516 deletions
+2 -31
View File
@@ -125,6 +125,8 @@ def build_extract_messages(text: str) -> list[dict[str, str]]:
"你是询价字段抽取器。只根据销售原话抽取字段,调用 extract_inquiry_fields。"
"未出现的字段必须空串,禁止编造港口、重量、日期。"
"空运件数/毛重/体积/包装方式;海运货量与箱型箱量;陆运按二级类型。"
"陆运整车/中港零担的车型写入车型/数量:45HQ(13.5厢车)、9米6/1、3T;"
"陆运不要把 45HQ/厢车 写成箱型箱量。"
"海运时 15件/20吨/3箱 必须写入货量,不要只写到件数把货量留空。"
"原话已带单位必须抽取,不要因为没写「毛重:」就留空:"
"10件/3pcs→空运件数;海运同样数字+件也要写入货量;100KGS/180kg/1.5KG/100公斤→毛重;2CBM/4.2cbm/2.5立方/2方→体积;"
@@ -217,35 +219,4 @@ 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