- 使用其中的“文本分析”的API接口,始终success=false,msg=“系统异常,请稍后再试”
如题,init应该是没有问题的,模拟器都过不去
2021-01-22 - 如何正确调用openaiwidget中的情感分析API?
app.json: (openaiwidget 初始化) "sitemapLocation": "sitemap.json", "plugins": { "chatbot": { "version": "1.2.10", "provider": "wx8c631f7e9f2465e1" } }, "requiredBackgroundModes": [ "audio" ] page1.js(openaiwidget调用处) wx.cloud.callFunction({ name:'getusrid', //该云函数返回openid,经过测试,openid可以被返回 complete:res=>{ openid = res.result.openid; console.log('openid:',openid); plugin.init({ appid: "************", openid:openid, success:function(){ console.log("AI initialized successfully!");//每次调用也都是输出的这个 }, fail: (error) => { console.log("AI initialized failed!"); }, }); } }); const txt = "恭喜小张脱单成功"; plugin.api.nlp('sentiment', {q: txt, mode: '6class'}).then(res => { console.log("sentiment result : ", res); });//这里我直接用的微信官方文档上的代码,但是每次都会输出sentiment result : {success: false, code: 874883, msg: "系统异常,请稍候再试"} ballball各位大佬了,救救孩子吧
2021-01-21