We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8afc235 commit 52ad5bdCopy full SHA for 52ad5bd
service/src/utils/textAudit.ts
@@ -40,12 +40,12 @@ export class BaiduTextAuditService implements TextAuditService {
40
// https://ai.baidu.com/ai-doc/ANTIPORN/Nk3h6xbb2#%E7%BB%86%E5%88%86%E6%A0%87%E7%AD%BE%E5%AF%B9%E7%85%A7%E8%A1%A8
41
42
// 3 仅政治
43
- const safe = data.data.filter(d => d.subType === 3).length <= 0
44
- if (!safe || !this.options.label)
45
- return safe
+ const sensitive = data.data.filter(d => d.subType === 3).length > 0
+ if (sensitive || !this.options.label)
+ return sensitive
46
const str = JSON.stringify(data)
47
for (const l of this.options.label.split(',')) {
48
- if (str.indexOf(l))
+ if (str.includes(l))
49
return true
50
}
51
return false
0 commit comments