fix: IoT快速通道补充关掉/关上 + 多设备上下文窗口扩展至30字节
- intent_analyzer: isStrongIoTCommand controlWords新增"关掉""关上" - iot_provider: 操作检测上下文窗口±15→±30字节,新增全文回退逻辑 - 修复多设备命令中远处关键词无法匹配导致操作误判为query E2E: "关掉"快速通道2.57s✅ 多设备同时开关✅ 8设备查询✅ Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -130,7 +130,7 @@ func (a *IntentAnalyzer) isStrongIoTCommand(userMessage string) bool {
|
||||
msgLower := strings.TrimSpace(strings.ToLower(userMessage))
|
||||
|
||||
// 控制类关键词 + 设备类关键词组合出现,即可判断为 IoT 命令
|
||||
controlWords := []string{"打开", "关闭", "调到", "设置", "开关", "调节", "调高", "调低", "开一下", "关一下"}
|
||||
controlWords := []string{"打开", "关闭", "关掉", "关上", "调到", "设置", "开关", "调节", "调高", "调低", "开一下", "关一下"}
|
||||
deviceWords := []string{"灯", "空调", "窗帘", "电视", "风扇", "加湿器", "插座", "门锁", "传感器"}
|
||||
|
||||
hasControl := false
|
||||
|
||||
Reference in New Issue
Block a user