简体   繁体   English

在拒绝 Google 帐户链接后重新调用意图期间出现问题

[英]Getting Issue during re-calling the intent after rejecting Google Account linking

Below is my chatbot structure下面是我的聊天机器人结构
Intent 1 (result): Here User will ask for a result.意图 1(结果):用户将在此处询问结果。 It will do the account linking and check the email id registration on their server whether it is registered or not via API and showing the result.它将执行帐户链接并检查其服务器上的 email id 注册是否通过 API 注册并显示结果。

app.intent('result', (conv,{date})=>{ 
var userDate =  date;     
var apiUserEmailID=  conv.data.apiUserEmailID;   
var apiUserKey= conv.data.apiUserKey;    
console.log("apiUserKey : "+apiUserKey); 
if (typeof (apiUserKey) == "undefined" || apiUserKey == "" || apiUserKey == null) 
{
 conv.ask(new SignIn('To get your account details'));// Intent that starts the account linking flow.  
}
else
{   
 conv.ask("Welcome to quote generator"+userDate+" Session : "+apiUserKey); 
**//Flow should come here when ask for the next time after Google account linking**
}  
}); 

app.intent('user_Login', (conv, params, signin) => {// Create a Dialogflow intent with the `actions_intent_SIGN_IN` event.  
if (signin.status === 'OK') 
{ 
const payload = conv.user.profile.payload;    
conv.data.apiUserEmailID=payload.email; //Session Creation    
var url = apiPathAJ+'/CheckAccess?uid=payload.email';  
var login_response="",login_Userkey="";    
return getaxiosURL(url).then(response => {  
response.data.map(loginObj=>{    
if(loginObj.Status=="TRUE")
{login_response = "1";
login_Userkey=loginObj.UserKey;}
else     
{login_response = "0";  
login_Userkey="0";}    
}); 
if(login_response=="1")
  {
   conv.data.apiUserKey=login_Userkey;   
   conv.ask("You are a registered User with Our Service. Here is your result *******");
  }
  else 
  { 
    conv.ask("You are not a registered User. Would you like to proceed with the Service registration.");
  }
}).catch (error => {
login_response="2";
console.log("Something is wrong in login_response("+login_response+") !! " + error);   
});

}
else 
  {
    conv.ask(`I won't be able to save your data, but what do you want to do next?`);
  }  
});

Below is the conversation example.下面是对话示例。
User: I want to see my result for 25th June 2019.用户:我想查看 2019 年 6 月 25 日的结果。
ChatBot:.....(It will ask for the account linking) ChatBot:.....(它会要求帐户链接)
User: Yes用户:是的
ChatBot:You are a registered User with Our Service. ChatBot:您是我们服务的注册用户。
User: I want to see my result for 25th June 2019.用户:我想查看 2019 年 6 月 25 日的结果。

Another conversation example.另一个对话示例。
User: I want to see my result for 25th June 2019.用户:我想查看 2019 年 6 月 25 日的结果。
ChatBot:.....(It will ask for the account linking) ChatBot:.....(它会要求帐户链接)
User: No用户:没有
ChatBot:I won't be able to save your data, but what do you want to do next? ChatBot:我将无法保存您的数据,但您接下来要做什么?
User: I want to see my result for 25th June 2019.用户:我想查看 2019 年 6 月 25 日的结果。

In both the conversation, If user will ask the same question(user's last comment) or we can say it hits the intent (result), i am getting this exception and the conversation is existing.在这两个对话中,如果用户会问相同的问题(用户的最后评论)或者我们可以说它达到了意图(结果),我得到这个异常并且对话是存在的。

Error: Dialogflow IntentHandler not found for intent: user_Login-result at Function.错误:未找到 Dialogflow IntentHandler 的意图:Function 的 user_Login-result。 (/srv/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:141:31) at Generator.next () at fulfilled (/srv/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:19:58) at at process._tickDomainCallback (internal/process/next_tick.js:229:7) (/srv/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:141:31) 在 Generator.next () 完成时 (/srv/node_modules/actions-on-google/dist/service/ dialogflow/dialogflow.js:19:58) 在 process._tickDomainCallback (internal/process/next_tick.js:229:7)

The error message suggests that the "result-dailyPrediction" Intent is the one that has matched in Dialogflow, but there is no handler registered with app.intent('result-dailyPrediction') .错误消息表明“result-dailyPrediction”意图是在 Dialogflow 中匹配的意图,但没有使用app.intent('result-dailyPrediction')注册处理程序。

You should either register such an intent handler, or figure out why you're getting to that Intent and correct it (if it shouldn't be there).您应该注册这样的意图处理程序,或者弄清楚为什么要访问该意图并更正它(如果它不应该存在的话)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM