Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/151.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dialogflow es DialogFlow中的密码验证_Dialogflow Es - Fatal编程技术网

Dialogflow es DialogFlow中的密码验证

Dialogflow es DialogFlow中的密码验证,dialogflow-es,Dialogflow Es,dialogflow中的密码验证 嗨 我想做这份工作,但我无法理解怎么做 我需要什么 欢迎按摩后,DF询问用户密码 用户输入短语 如果它是=password,那么DF显示message1并可以获取任何短语 如果不是密码,则DF显示消息2,DF再次询问用户密码 现在我在第4步遇到了一个问题——当用户输入来自其他意图的短语时,DF显示的是其他响应,而不是消息2 请帮忙 我正在尝试webhook function StartWelcome (agent) { // get the employ

dialogflow中的密码验证

我想做这份工作,但我无法理解怎么做

我需要什么

  • 欢迎按摩后,DF询问用户密码
  • 用户输入短语
  • 如果它是=password,那么DF显示message1并可以获取任何短语
  • 如果不是密码,则DF显示消息2,DF再次询问用户密码
  • 现在我在第4步遇到了一个问题——当用户输入来自其他意图的短语时,DF显示的是其他响应,而不是消息2

    请帮忙

    我正在尝试webhook

    function StartWelcome (agent) {
        // get the employee ID parameter from the request header received from Dialogflow
        let password = agent.parameters.password;
        if (password == 1) { agent.add(agent.request_.body.queryResult.fulfillmentText); }   else { agent.add(`Неправильный пароль! Введите пароль вновь.`); 
        agent.parameters.password = '';
       let intentMap = new Map();
       intentMap.set('StartWelcome', StartWelcome);
       agent.handleRequest(intentMap);
    
    我尝试了上下文。


    但是,如果用户说的短语不是密码,而是与另一个短语匹配-DF type response of matching phrase.

    您能为问题添加更多细节吗,例如您迄今为止尝试了什么?您能为问题添加更多细节吗,例如您迄今为止尝试了什么?