mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 01:53:53 +08:00
改用精准匹配生成提示词
This commit is contained in:
@@ -508,7 +508,10 @@ export default {
|
|||||||
|
|
||||||
// 检测字段是否为敏感字段
|
// 检测字段是否为敏感字段
|
||||||
isSensitiveField(fieldName) {
|
isSensitiveField(fieldName) {
|
||||||
return this.sensitive_keys.some((key) => fieldName.toLowerCase().includes(key));
|
// 将字段名转换为小写进行比较
|
||||||
|
const lowerFieldName = fieldName.toLowerCase();
|
||||||
|
// 精确匹配keyMap中定义的7个敏感词
|
||||||
|
return this.sensitive_keys.includes(lowerFieldName);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取敏感字段对应的中文名称
|
// 获取敏感字段对应的中文名称
|
||||||
|
|||||||
Reference in New Issue
Block a user