Exemple #1
0
 public async Task GetInfo(IDialogContext context, LuisResult result)
 {
     if (!isReply(context, result))
     {
         EntityRecommendation InfoType;
         if (result.TryFindEntity("InfoType", out InfoType))
         {
             KnowledgeBase kb = new KnowledgeBase();
             if (InfoType.Entity.Contains("ox"))
             {
                 await context.PostAsync(kb.GetArticle("KB0010016"));
             }
             else if (InfoType.Entity.Contains("rive"))
             {
                 await context.PostAsync(kb.GetArticle("KB0010017"));
             }
             else if (InfoType.Entity.Contains("pproval"))
             {
                 Approvals approvals = new Approvals();
                 await approvals.GetPending(context);
             }
             else
             {
                 await context.PostAsync("Sorry. I couldn't find any article related to your question.");
             }
         }
         else
         {
             await context.PostAsync("Sorry. I couldn't find any article related to your question.");
         }
     }
     context.Wait(MessageReceived);
 }
Exemple #2
0
 public async Task Compare(IDialogContext context, LuisResult result)
 {
     if (!isReply(context, result))
     {
         KnowledgeBase kb = new KnowledgeBase();
         await context.PostAsync(kb.GetArticle("KB0010003"));
     }
     context.Wait(MessageReceived);
 }