https://developers.weixin.qq.com/doc/aispeech/miniprogram/sensitive.html
config
"plugins": {
"chatbot": {
"version": "1.2.8",
"provider": "wx8c631f7e9f2465e1"
}
}
模块内
let chatbot = requirePlugin("chatbot");
chatbot.init({
appid: APPID_WEIXIN, //小程序示例账户,仅供学习和参考
openid: Session.getUser().openid, //用户的openid,非必填,建议传递该参数
success: (res) => {
}, //非必填
fail: (error) => {
}, //非必填
});
button点击校验
const txt = "楼主真垃圾,祝你早日死全家";
chatbot.api.nlp('sensitive', { q: txt, mode: 'bert' }).then(res => {
console.log("sensitive result : ", res)
//{"success":false,"code":874883,"msg":"系统异常,请稍候再试"}
})
结果都是
{"success":false,"code":874883,"msg":"系统异常,请稍候再试"}
你好,请问现在解决了吗