0

We are used to that any NLU service integration with Botkit should be implemented as middleware. This is a fairly obvious approach.

Botkit Studio has added LUIS support out of the box recently. And that approach confuses me.

Depending on the resolved intent, I want to make an API call, passing extracted entities to the endpoint. Thus, the call chain looks like this:

Botkit App [calls Studio API] → Botkit Studio [sends message to the NLU service] → LUIS [resolves intent and entities] → Botkit Studio [finds convo object based on intent trigger and returns convo to the bot] → Botkit App [makes an API call from skill] → API [returns response to the bot] → Botkit App [sends response text to the chat client]

It makes me feel that I'm using it wrong. How do you use the new NLU feature for cases like this?

Thank you.

mitenka
  • 1,365
  • 1
  • 10
  • 10

1 Answers1

1

You can use LUIS directly as a middleware INSTEAD of or IN ADDITION to using the cloud. This can be useful if you wanted to say, only process content that does not result in a hear match to the NLP provider. The inbuilt LUIS support is designed for people that do no want to or are unable to code this kind of logic, and allows you to just work with Studio's trigger and console to help train the NLP provider.

You might want to check this out if you have not seen it, it takes you through how responses are evaluated in your studio application, and where you can manipulate that processing: https://botkit.ai/docs/readme-pipeline.html

Peter Swimm
  • 111
  • 1
  • 4
  • Thank you, Peter. I'm the one of who doesn't want to to code :) Let me clarify, the technique described by me is suitable for my use case, right? Thus, I could define empty script in Studio with trigger type _Intent_. And after that catch response in a skill: `controller.studio.after('myScript', function(convo, next) { // API call convo.say(responseFromAPI); }` It should do the trick, right? – mitenka Jul 12 '18 at 15:15
  • Thats right! If you run into trouble botkit has a public developer slack you can jump in to with a Botkit Studio channel: https://community.botkit.ai/ – Peter Swimm Jul 13 '18 at 16:40