Beispiel #1
0
        public async Task DownloadKnowledgeBase(IDialogContext context, LuisResult result)
        {
            if (await fileBlob.ExistsFileAsync(configuration.GetString("fileBlobContainer"), configuration.GetString("PublicKBDownloadFile")))
            {
                var linkExpiracy = configuration.GetConfiguration <int>("kbLinkExpiricy");
                var link         = await GenerateKbLinkWithSASToken(linkExpiracy);
                await SendDownloadKnowledgeBaseEvent(context, true);

                await context.PostAsync(string.Format(messageProvider.GetMessage("KbLink"), link, linkExpiracy));
            }
            else
            {
                await SendDownloadKnowledgeBaseEvent(context, false);

                await context.PostAsync(messageProvider.GetMessage("KBNotAvailable"));
            }
        }