LUIS , fetching user response from bot











up vote
0
down vote

favorite












I have build bot integrated with LUIS , An intent by name "Order" is getting captured and dialogue get triggered successfully . I want to know how to capture the User's input .
I am not allowed to use prompt because the intent recognition is happening and then accordingly dialogue gets initiated .



Looking forward to help me in capturing User input .



Example" User said : Looking for my status of my last order .



order is intent .



matched 80% -------> order dialogue started .






var builder = require('botbuilder');
module.exports = function(bot) {
// Make sure you add code to validate these fields
var luisAppId = process.env.LuisAppId;
var luisAPIKey = process.env.LuisAPIKey;
var luisAPIHostName = process.env.LuisAPIHostName || 'westus.api.cognitive.microsoft.com';

const LuisModelUrl = 'https://' + luisAPIHostName + '/luis/v2.0/apps/' + luisAppId + '?subscription-key=' + luisAPIKey;

// Create a recognizer that gets intents from LUIS, and add it to the bot
var recognizer = new builder.LuisRecognizer(LuisModelUrl);
bot.recognizer(recognizer);

// Add a dialog for each intent that the LUIS app recognizes.
// See https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-recognize-intent-luis

bot.dialog('OrderDialog',
function (session) {
session.send("this is order LUIS segment, try to fetch User input "
}
).triggerAction({
matches: 'Order'
})
}












share|improve this question






















  • Just to clarify, are you asking how to prompt the user for input inside of the 'OrderDialog' intent at the point where you currently include session.send()?
    – Mark B
    Nov 12 at 23:12






  • 1




    No , Sorry but I refine my question , I am looking more into capturing whole input given by user . example if (step1) user asked bot -"I want to know my order status" in the statement order is intent , once intent is recognized by LUIS it will bring orderDialogue . I want to capture whole statement asked by user in step1.
    – Pranavjeet.Mishra
    Nov 13 at 6:43

















up vote
0
down vote

favorite












I have build bot integrated with LUIS , An intent by name "Order" is getting captured and dialogue get triggered successfully . I want to know how to capture the User's input .
I am not allowed to use prompt because the intent recognition is happening and then accordingly dialogue gets initiated .



Looking forward to help me in capturing User input .



Example" User said : Looking for my status of my last order .



order is intent .



matched 80% -------> order dialogue started .






var builder = require('botbuilder');
module.exports = function(bot) {
// Make sure you add code to validate these fields
var luisAppId = process.env.LuisAppId;
var luisAPIKey = process.env.LuisAPIKey;
var luisAPIHostName = process.env.LuisAPIHostName || 'westus.api.cognitive.microsoft.com';

const LuisModelUrl = 'https://' + luisAPIHostName + '/luis/v2.0/apps/' + luisAppId + '?subscription-key=' + luisAPIKey;

// Create a recognizer that gets intents from LUIS, and add it to the bot
var recognizer = new builder.LuisRecognizer(LuisModelUrl);
bot.recognizer(recognizer);

// Add a dialog for each intent that the LUIS app recognizes.
// See https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-recognize-intent-luis

bot.dialog('OrderDialog',
function (session) {
session.send("this is order LUIS segment, try to fetch User input "
}
).triggerAction({
matches: 'Order'
})
}












share|improve this question






















  • Just to clarify, are you asking how to prompt the user for input inside of the 'OrderDialog' intent at the point where you currently include session.send()?
    – Mark B
    Nov 12 at 23:12






  • 1




    No , Sorry but I refine my question , I am looking more into capturing whole input given by user . example if (step1) user asked bot -"I want to know my order status" in the statement order is intent , once intent is recognized by LUIS it will bring orderDialogue . I want to capture whole statement asked by user in step1.
    – Pranavjeet.Mishra
    Nov 13 at 6:43















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have build bot integrated with LUIS , An intent by name "Order" is getting captured and dialogue get triggered successfully . I want to know how to capture the User's input .
I am not allowed to use prompt because the intent recognition is happening and then accordingly dialogue gets initiated .



Looking forward to help me in capturing User input .



Example" User said : Looking for my status of my last order .



order is intent .



matched 80% -------> order dialogue started .






var builder = require('botbuilder');
module.exports = function(bot) {
// Make sure you add code to validate these fields
var luisAppId = process.env.LuisAppId;
var luisAPIKey = process.env.LuisAPIKey;
var luisAPIHostName = process.env.LuisAPIHostName || 'westus.api.cognitive.microsoft.com';

const LuisModelUrl = 'https://' + luisAPIHostName + '/luis/v2.0/apps/' + luisAppId + '?subscription-key=' + luisAPIKey;

// Create a recognizer that gets intents from LUIS, and add it to the bot
var recognizer = new builder.LuisRecognizer(LuisModelUrl);
bot.recognizer(recognizer);

// Add a dialog for each intent that the LUIS app recognizes.
// See https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-recognize-intent-luis

bot.dialog('OrderDialog',
function (session) {
session.send("this is order LUIS segment, try to fetch User input "
}
).triggerAction({
matches: 'Order'
})
}












share|improve this question













I have build bot integrated with LUIS , An intent by name "Order" is getting captured and dialogue get triggered successfully . I want to know how to capture the User's input .
I am not allowed to use prompt because the intent recognition is happening and then accordingly dialogue gets initiated .



Looking forward to help me in capturing User input .



Example" User said : Looking for my status of my last order .



order is intent .



matched 80% -------> order dialogue started .






var builder = require('botbuilder');
module.exports = function(bot) {
// Make sure you add code to validate these fields
var luisAppId = process.env.LuisAppId;
var luisAPIKey = process.env.LuisAPIKey;
var luisAPIHostName = process.env.LuisAPIHostName || 'westus.api.cognitive.microsoft.com';

const LuisModelUrl = 'https://' + luisAPIHostName + '/luis/v2.0/apps/' + luisAppId + '?subscription-key=' + luisAPIKey;

// Create a recognizer that gets intents from LUIS, and add it to the bot
var recognizer = new builder.LuisRecognizer(LuisModelUrl);
bot.recognizer(recognizer);

// Add a dialog for each intent that the LUIS app recognizes.
// See https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-recognize-intent-luis

bot.dialog('OrderDialog',
function (session) {
session.send("this is order LUIS segment, try to fetch User input "
}
).triggerAction({
matches: 'Order'
})
}








var builder = require('botbuilder');
module.exports = function(bot) {
// Make sure you add code to validate these fields
var luisAppId = process.env.LuisAppId;
var luisAPIKey = process.env.LuisAPIKey;
var luisAPIHostName = process.env.LuisAPIHostName || 'westus.api.cognitive.microsoft.com';

const LuisModelUrl = 'https://' + luisAPIHostName + '/luis/v2.0/apps/' + luisAppId + '?subscription-key=' + luisAPIKey;

// Create a recognizer that gets intents from LUIS, and add it to the bot
var recognizer = new builder.LuisRecognizer(LuisModelUrl);
bot.recognizer(recognizer);

// Add a dialog for each intent that the LUIS app recognizes.
// See https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-recognize-intent-luis

bot.dialog('OrderDialog',
function (session) {
session.send("this is order LUIS segment, try to fetch User input "
}
).triggerAction({
matches: 'Order'
})
}





var builder = require('botbuilder');
module.exports = function(bot) {
// Make sure you add code to validate these fields
var luisAppId = process.env.LuisAppId;
var luisAPIKey = process.env.LuisAPIKey;
var luisAPIHostName = process.env.LuisAPIHostName || 'westus.api.cognitive.microsoft.com';

const LuisModelUrl = 'https://' + luisAPIHostName + '/luis/v2.0/apps/' + luisAppId + '?subscription-key=' + luisAPIKey;

// Create a recognizer that gets intents from LUIS, and add it to the bot
var recognizer = new builder.LuisRecognizer(LuisModelUrl);
bot.recognizer(recognizer);

// Add a dialog for each intent that the LUIS app recognizes.
// See https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-recognize-intent-luis

bot.dialog('OrderDialog',
function (session) {
session.send("this is order LUIS segment, try to fetch User input "
}
).triggerAction({
matches: 'Order'
})
}






node.js nlp botframework luis






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 at 12:16









Pranavjeet.Mishra

1




1












  • Just to clarify, are you asking how to prompt the user for input inside of the 'OrderDialog' intent at the point where you currently include session.send()?
    – Mark B
    Nov 12 at 23:12






  • 1




    No , Sorry but I refine my question , I am looking more into capturing whole input given by user . example if (step1) user asked bot -"I want to know my order status" in the statement order is intent , once intent is recognized by LUIS it will bring orderDialogue . I want to capture whole statement asked by user in step1.
    – Pranavjeet.Mishra
    Nov 13 at 6:43




















  • Just to clarify, are you asking how to prompt the user for input inside of the 'OrderDialog' intent at the point where you currently include session.send()?
    – Mark B
    Nov 12 at 23:12






  • 1




    No , Sorry but I refine my question , I am looking more into capturing whole input given by user . example if (step1) user asked bot -"I want to know my order status" in the statement order is intent , once intent is recognized by LUIS it will bring orderDialogue . I want to capture whole statement asked by user in step1.
    – Pranavjeet.Mishra
    Nov 13 at 6:43


















Just to clarify, are you asking how to prompt the user for input inside of the 'OrderDialog' intent at the point where you currently include session.send()?
– Mark B
Nov 12 at 23:12




Just to clarify, are you asking how to prompt the user for input inside of the 'OrderDialog' intent at the point where you currently include session.send()?
– Mark B
Nov 12 at 23:12




1




1




No , Sorry but I refine my question , I am looking more into capturing whole input given by user . example if (step1) user asked bot -"I want to know my order status" in the statement order is intent , once intent is recognized by LUIS it will bring orderDialogue . I want to capture whole statement asked by user in step1.
– Pranavjeet.Mishra
Nov 13 at 6:43






No , Sorry but I refine my question , I am looking more into capturing whole input given by user . example if (step1) user asked bot -"I want to know my order status" in the statement order is intent , once intent is recognized by LUIS it will bring orderDialogue . I want to capture whole statement asked by user in step1.
– Pranavjeet.Mishra
Nov 13 at 6:43














1 Answer
1






active

oldest

votes

















up vote
0
down vote
















bot.dialog('OrderDialog',
function (session) {
console.log("session value capturing==============>",session.message.text);
}
);










share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53262020%2fluis-fetching-user-response-from-bot%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote
















    bot.dialog('OrderDialog',
    function (session) {
    console.log("session value capturing==============>",session.message.text);
    }
    );










    share|improve this answer

























      up vote
      0
      down vote
















      bot.dialog('OrderDialog',
      function (session) {
      console.log("session value capturing==============>",session.message.text);
      }
      );










      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote












        bot.dialog('OrderDialog',
        function (session) {
        console.log("session value capturing==============>",session.message.text);
        }
        );










        share|improve this answer















        bot.dialog('OrderDialog',
        function (session) {
        console.log("session value capturing==============>",session.message.text);
        }
        );










        bot.dialog('OrderDialog',
        function (session) {
        console.log("session value capturing==============>",session.message.text);
        }
        );







        bot.dialog('OrderDialog',
        function (session) {
        console.log("session value capturing==============>",session.message.text);
        }
        );








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 at 13:31









        Pranavjeet.Mishra

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53262020%2fluis-fetching-user-response-from-bot%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Guess what letter conforming each word

            Port of Spain

            Run scheduled task as local user group (not BUILTIN)