AIUI开放平台:多轮对话返回前几轮语槽数据

编写云函数:

AIUI.create("v2",  function(aiui,  err){
// 获取 response
response = aiui.getResponse();
//托管
response.addDelegateDirective();
requestObject = aiui.getRequest().getObject();
// 打印获取当前意图名
intentName = requestObject.request.intents[0].name;
console.log("本次意图来自:"+intentName);
console.log("dialogState:"+requestObject.request.dialogState);
//获取所有语槽
slots = requestObject.request.intents[0].slots;
slots.dialogState=requestObject.request.dialogState;
response.setData(slots);
aiui.commit();
})

  

上一篇:python 开发一个支持多用户在线的FTP


下一篇:HTML5初学者福利!11个在线学习网站推荐