@@ -85,9 +85,11 @@ def naive_fill_slots(message: str, slots_meta: list[dict[str, Any]], current: di
|
||||
|
||||
|
||||
# 本轮若已通过关键词写入至少一个槽,就不再把整句灌进其它空槽
|
||||
# 但允许多个关键词槽在同一轮同时写入(如「冷库+实时」)
|
||||
if touched:
|
||||
return updated
|
||||
|
||||
|
||||
pending = sorted(
|
||||
[s for s in slots_meta if s.get("required") and not updated.get(s["id"])],
|
||||
key=lambda s: s.get("priority", 100),
|
||||
|
||||
Reference in New Issue
Block a user