Ejemplo n.º 1
0
        public async Task MessageRecievedAsync(IDialogContext context, IAwaitable <LuisResult> input)
        {
            var    x     = await input;
            string query = x.Query;

            PypestreamHackathon.Helpers.BingHelper bingHelper = new BingHelper();

            var bingSearchResults = await bingHelper.GetSearchResults(query, 5);

            List <string> rez = new List <string>();

            foreach (var searchResult in bingSearchResults)
            {
                rez.Add(searchResult.Title);
            }

            string searchResultsString = String.Join(string.Empty, rez);

            // Add carosel here...time provided

            context.Done(searchResultsString);
        }