fix: 修复AI在查询设备时误调用控制工具的问题

- iot_control: 工具描述添加明确约束,仅在用户明确要求控制时调用
- iot_query: 提示LLM设备状态已注入系统提示词,减少不必要查询
- context builder: 设备状态标题提示LLM无需调用工具查询
This commit is contained in:
2026-05-17 15:55:43 +08:00
parent a80bfd12eb
commit 745b1c6aad
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ func InjectDeviceContext(devices []DeviceInfo) string {
}
var sb strings.Builder
sb.WriteString("[当前IoT设备状态]\n")
sb.WriteString("[当前IoT设备状态 — 你已知晓这些设备的状态,无需调用工具查询,直接引用即可]\n")
for _, d := range devices {
switch d.Type {
case "light":