fix: 冷链/药品关键词写入场景槽位

Co-authored-by: haijd <haijd@163.com>
This commit is contained in:
Cursor Agent
2026-09-20 01:45:23 +00:00
co-authored by haijd
parent 3111142984
commit bb8b3742ac
+4
View File
@@ -74,6 +74,10 @@ def naive_fill_slots(message: str, slots_meta: list[dict[str, Any]], current: di
set_slot("scenario", "户外监测") set_slot("scenario", "户外监测")
elif "实验室" in text: elif "实验室" in text:
set_slot("scenario", "实验室") set_slot("scenario", "实验室")
elif any(k in text for k in ("冷链", "药品", "疫苗", "生鲜", "冷冻", "温度记录", "记录仪")):
set_slot("scenario", text if len(text) <= 40 else "冷链温度监测")
if "Fresh Tag" in text or "fresh tag" in text.lower():
set_slot("scenario", "Fresh Tag 1 冷链温度记录")
# 本轮若已通过关键词写入至少一个槽,就不再把整句灌进其它空槽 # 本轮若已通过关键词写入至少一个槽,就不再把整句灌进其它空槽
if touched: if touched: