Skip to content

Instantly share code, notes, and snippets.

@garunski
Created April 23, 2016 08:23
Show Gist options
  • Select an option

  • Save garunski/b9be328772c4ec4fdfc42a2e4bd23e8a to your computer and use it in GitHub Desktop.

Select an option

Save garunski/b9be328772c4ec4fdfc42a2e4bd23e8a to your computer and use it in GitHub Desktop.
[BotAuthentication]
public class MessagesController : ApiController
{
public async Task<Message> Post([FromBody] Message message)
{
return await Conversation.SendAsync(message, () => new DocAssistDialog());
}
}
[LuisModel("nope", "nope")]
[Serializable]
public class DocAssistDialog : LuisDialog<object>
{
[LuisIntent("")]
public async Task None(IDialogContext context, LuisResult result)
{
var message = $"Sorry I did not understand: " + string.Join(", ", result.Intents.Select(i => i.Intent));
await context.PostAsync(message);
context.Wait(MessageReceived);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment