5

So far, I've been able to train a LUIS model and hook up its intents into a dialog that inherits from LuisDialog. I assumed that when whenever I sent an unrecognizable message to the model, it would be captured by the 'None' intent, and that's true for text, but not for files. When i send a picture, for instance, nothing happens, and when I send text+picture, some intent will pick it up, but there will be no picture in the message attachments.

What is the recommended way to handle files inside a LUIS dialog?

OmG
  • 18,337
  • 10
  • 57
  • 90
Bernardo
  • 53
  • 2
  • Is this in C# or Node? On the Node side of things I don't call LUIS if there isn't any text but I should still call the onDefault() handler which would provide you access to the uploaded attachment. Not sure what happens on the C# side. – Steven Ickman Apr 08 '16 at 02:32
  • Sorry for not mentioning, it's in C#. Your comment helped me in any case. I decided to handle messages that include attachments in a separate dialog, and it is working now. Thank you. – Bernardo Apr 08 '16 at 13:57
  • Yes - answered here:- https://stackoverflow.com/questions/41712617/whats-the-correct-flow-to-handle-image-inputs-in-a-dialog-that-uses-luis/50957213#50957213. – Sam EA Jun 20 '18 at 21:27

1 Answers1

2

You can override the MessageReceived(...) function of the LuisDialog keep the fields of the message that you need as member variables (in this case the attachments) and access those fields in your intent handlers.