-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LUIS] How could call Luis inside a new dialog? #2741
Comments
If you're redirecting from the first waterfall step, I would say to just send the args object from your
|
So I've been asked before how to build a prompt based on a LUIS model and with v3.8 that we released this week it's now easier then ever. Here's how to use the new prompt customization system to build a custom LUIS prompt:
Now to use your custom prompt you can call it like any other prompt:
Anytime the prompt recognizes an intent from your model (other than None) it will return the matched intent. Is that what you're wanting? |
emm... actually, its not what I want...let me clarify again. on App.js file, I used Luis to match the utterance and if it find the the entity belongs to Type, then begin a new dialog, like what I did in below,
however, when I in procgosh.js file, I have a waterfall to ask user input more requirement fields, such as color, size, price etc..and there's one more filed is called "special", it allows user to input something, I want the procgosh.js is able to recognize the user's inputting to another intent of LUIS, right now, I have to use HTTP Request to query the Json file back and parse it, such as below, so I want to know if there's any way to reuse builder.EntityRecognizer.findEntity instead of below callback function. tkx.
` |
@stevengum97 I tried to renew a new LUIS instance on the procgosh.js file, in one of waterfall steps, however this doesnt work as return Null, or will error to me with "module has been used" so, how can i use LUIS to recognize the result.response?
|
@wolf0x you can call LUIS manually using
|
@Stevenic great and thanks, thats what I want.. tkx again. |
Closing issue |
So I'd thought I'd leave a comment here as I was in need of calling multiple LUIS models in dialog's. I just used a part of your custom prompt @Stevenic to use the session at the start of a dialog instead:
This way I get the matched intent too, as opposed to just getting and array of intents and entities by manually using ADDED: I'm not sure if this is the best way but I stored the original message like so:
Then used it in a later dialog:
|
I am facing similar problem
|
I'm not sure your issue relates to this, would this not work in your case:
|
dialog.matches('morningUpdate', 'morningUpdate');
bot.dialog('morningUpdate', [
function (session, args, next) {
}
]);
bot.dialog('/work', [
function (session, args) {
builder.LuisRecognizer.recognize(session.message.text, '<model url>', function (err, intents, entities) {
var result = {};
result.intents = intents;
result.entities = entities;
intents.forEach(function (intent) {
if (intent.intent == 'morningUpdate') {
session.beginDialog('morningUpdate', result);
} else {
// Do other stuff
}
}
});
}
]); @aakashkag Is this what you're asking for? |
yes exactly . btw thanks so much |
Add this to the documentation please! Spent too many time to find this. |
@akontsevich This is a closed issue. Please open a new issue for your request. |
System Information (Required)
6.9.5 + 4.5.0
Issue Description
How could call Luis inside a sub dialog?
I have a app.js which will match the intents of the user's request, then it will begin a new dialog while matched. however in the new dialog, it will ask user more questions, and I need LUIS to match and recognize the user's inputting on the new dialog, how could i do that?
Example Code
The text was updated successfully, but these errors were encountered: