chatbot 敏感词校验提示系统异常 请稍后再试?
发布于 6 年前 作者 linmin 12044 次浏览 来自 问答
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":"系统异常,请稍候再试"}

1 回复

请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

回到顶部