├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── SDKV4-Samples
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── _config.yml
├── dotnet_core
│ ├── ComplexDialogBot
│ │ ├── BotBuilder.ruleset
│ │ ├── ComplexDialogBot.cs
│ │ ├── ComplexDialogBot.csproj
│ │ ├── ComplexDialogBotAccessors.cs
│ │ ├── DeploymentScripts
│ │ │ └── MsbotClone
│ │ │ │ └── bot.recipe
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── README.md
│ │ ├── Startup.cs
│ │ ├── UserProfile.cs
│ │ ├── appsettings.json
│ │ ├── complex-dialog.bot
│ │ └── wwwroot
│ │ │ └── default.htm
│ ├── DialogInterruptionsBot
│ │ ├── BotBuilder.ruleset
│ │ ├── DeploymentScripts
│ │ │ └── MsbotClone
│ │ │ │ └── bot.recipe
│ │ ├── DialogInterruptionsBot.cs
│ │ ├── DialogInterruptionsBot.csproj
│ │ ├── DialogInterruptionsBotAccessors.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── README.md
│ │ ├── Startup.cs
│ │ ├── UserProfile.cs
│ │ ├── appsettings.json
│ │ ├── dialog-interruptions.bot
│ │ └── wwwroot
│ │ │ └── default.htm
│ ├── DialogPromptBot
│ │ ├── DeploymentScripts
│ │ │ └── MsbotClone
│ │ │ │ └── bot.recipe
│ │ ├── DialogPromptBot.cs
│ │ ├── DialogPromptBot.csproj
│ │ ├── DialogPromptBot.ruleset
│ │ ├── DialogPromptBot.xml
│ │ ├── DialogPromptBotAccessors.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── README.md
│ │ ├── Startup.cs
│ │ ├── appsettings.json
│ │ ├── dialog-prompt.bot
│ │ └── wwwroot
│ │ │ └── default.htm
│ ├── PromptUsersForInput
│ │ ├── ConversationFlow.cs
│ │ ├── CustomPromptBot.cs
│ │ ├── CustomPromptBot.ruleset
│ │ ├── CustomPromptBotAccessors.cs
│ │ ├── DeploymentScripts
│ │ │ └── MsbotClone
│ │ │ │ └── bot.recipe
│ │ ├── Program.cs
│ │ ├── PromptUsersForInput.csproj
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── README.md
│ │ ├── Startup.cs
│ │ ├── UserProfile.cs
│ │ ├── appsettings.json
│ │ ├── custom-prompt.bot
│ │ └── wwwroot
│ │ │ └── default.htm
│ ├── StateBot
│ │ ├── ConversationData.cs
│ │ ├── DeploymentScripts
│ │ │ └── MsbotClone
│ │ │ │ └── bot.recipe
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── README.md
│ │ ├── Startup.cs
│ │ ├── StateBot.cs
│ │ ├── StateBot.csproj
│ │ ├── StateBot.ruleset
│ │ ├── StateBot.sln
│ │ ├── StateBot.xml
│ │ ├── StateBotAccessors.cs
│ │ ├── UserProfile.cs
│ │ ├── appsettings.json
│ │ ├── state.bot
│ │ └── wwwroot
│ │ │ └── default.htm
│ ├── nlp-with-dispatch
│ │ ├── QnAMaker.tsv
│ │ ├── home-automation.json
│ │ ├── nlp-with-dispatchDispatch.json
│ │ └── weather.json
│ └── nlp-with-luis
│ │ └── reminders-with-entities.json
└── js
│ ├── DialogPromptBot
│ ├── .env
│ ├── .eslintrc.js
│ ├── .gitignore
│ ├── README.md
│ ├── bot.js
│ ├── deploymentScripts
│ │ └── msbotClone
│ │ │ └── bot.recipe
│ ├── dialog-prompt.bot
│ ├── index.js
│ └── package.json
│ ├── PromptUsersForInput
│ ├── .env
│ ├── .eslintrc.js
│ ├── README.md
│ ├── bot.js
│ ├── deploymentScripts
│ │ └── msbotClone
│ │ │ └── bot.recipe
│ ├── index.js
│ ├── package.json
│ ├── resources
│ │ └── echo.chat
│ └── simplePrompts.bot
│ ├── complexDialogBot
│ ├── .eslintrc.js
│ ├── .gitignore
│ ├── ComplexDialogBot.bot
│ ├── README.md
│ ├── bot.js
│ ├── deploymentScripts
│ │ └── msbotClone
│ │ │ └── bot.recipe
│ ├── iisnode.yml
│ ├── index.js
│ ├── package.json
│ └── web.config
│ ├── nlp-with-dispatch
│ ├── QnAMaker.tsv
│ ├── home-automation.json
│ ├── nlp-with-dispatchDispatch.json
│ └── weather.json
│ ├── nlp-with-luis
│ └── reminders-with-entities.json
│ └── stateBot
│ ├── .env
│ ├── .eslintrc.js
│ ├── .gitignore
│ ├── README.md
│ ├── bot.js
│ ├── deploymentScripts
│ └── msbotClone
│ │ └── bot.recipe
│ ├── index.js
│ ├── package.json
│ ├── resources
│ └── echo.chat
│ └── stateBot.bot
├── SECURITY.md
├── StackOverflow-Bot
├── .gitignore
├── DialogAnalyzerFunc
│ ├── AnalyzeDialog.cs
│ ├── Clients
│ │ ├── DialogAnalyzerClient.cs
│ │ └── DialogDataInterpreter.cs
│ ├── DialogAnalyzerFunc.csproj
│ ├── Extensions
│ │ ├── EnumerableExtensions.cs
│ │ └── HttpExtensions.cs
│ ├── Models
│ │ ├── ComputerVisionImageAnalysisResult.cs
│ │ ├── DialogAnalysisResult.cs
│ │ ├── HandwritingRecognitionResult.cs
│ │ ├── ImageTextRegion.cs
│ │ └── TextAnalyticsResult.cs
│ ├── Services
│ │ ├── ComputerVisionService.cs
│ │ └── TextAnalyticsService.cs
│ ├── Utilities
│ │ ├── HttpClientUtility.cs
│ │ └── StringUtility.cs
│ └── host.json
├── LICENSE
├── README.md
├── StackBot
│ ├── Dockerfile
│ ├── StackBot.njsproj
│ ├── data
│ │ ├── jokes.json
│ │ ├── luis.json
│ │ └── smalltalk.tsv
│ ├── dialogs
│ │ ├── brain.js
│ │ ├── joke.js
│ │ ├── keywordPrompt.js
│ │ ├── languages.js
│ │ ├── menu.js
│ │ ├── screenshot.js
│ │ ├── search.js
│ │ └── smalltalk.js
│ ├── index.js
│ ├── lib
│ │ ├── attachments.js
│ │ ├── bingsearchclient.js
│ │ ├── cognitiveservices.js
│ │ ├── dialoganalyzerclient.js
│ │ ├── qnaclient.js
│ │ ├── sentimentanalyzerclient.js
│ │ └── smalltalk.js
│ ├── package-lock.json
│ ├── package.json
│ └── static
│ │ └── index.html
├── StackCode
│ ├── StackCode-0.1.1.vsix
│ ├── directline.png
│ ├── out
│ │ ├── src
│ │ │ ├── bot
│ │ │ │ └── bot.html
│ │ │ ├── extension.js
│ │ │ └── extension.js.map
│ │ └── test
│ │ │ ├── extension.test.js
│ │ │ ├── extension.test.js.map
│ │ │ ├── index.js
│ │ │ └── index.js.map
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── bot
│ │ │ └── bot.html
│ │ └── extension.ts
│ └── tsconfig.json
├── StackOverflowBot.sln
└── env.template
├── _config.yml
├── blog-samples
├── CSharp
│ ├── AzureSql-StateClient
│ │ ├── Microsoft.Bot.Sample.AzureSql.sln
│ │ ├── Microsoft.Bot.Sample.AzureSql
│ │ │ ├── App_Start
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Dialogs
│ │ │ │ └── RootDialog.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── Microsoft.Bot.Sample.AzureSql.csproj
│ │ │ ├── Migrations
│ │ │ │ ├── 201707121827490_Initial Setup.Designer.cs
│ │ │ │ ├── 201707121827490_Initial Setup.cs
│ │ │ │ ├── 201707121827490_Initial Setup.resx
│ │ │ │ └── Configuration.cs
│ │ │ ├── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── SqlStateService
│ │ │ │ ├── SqlBotDataContext.cs
│ │ │ │ ├── SqlBotDataEntity.cs
│ │ │ │ └── SqlBotDataStore.cs
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ └── README.md
│ ├── Bot-Feedback-Sample
│ │ ├── Bot-Feedback-Sample.sln
│ │ ├── Bot-Feedback-Sample
│ │ │ ├── App_Start
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── ApplicationInsights.config
│ │ │ ├── Bot-Feedback-Sample.csproj
│ │ │ ├── Connected Services
│ │ │ │ └── Application Insights
│ │ │ │ │ └── ConnectedService.json
│ │ │ ├── Controllers
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Dialogs
│ │ │ │ ├── FeedbackDialog.cs
│ │ │ │ └── QnADialog.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ └── README.md
│ ├── BotStateExport
│ │ ├── .gitignore
│ │ ├── BotStateExport
│ │ │ ├── BotStateExport.sln
│ │ │ └── BotStateExport
│ │ │ │ ├── App.config
│ │ │ │ ├── BotStateExport.csproj
│ │ │ │ ├── DocumentDbBotDataStore.cs
│ │ │ │ ├── Extensions.cs
│ │ │ │ ├── Program.cs
│ │ │ │ ├── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ │ │ ├── TableBotDataStore.cs
│ │ │ │ └── packages.config
│ │ └── README.md
│ ├── Custom-State-BotBuilder-Azure-Sample
│ │ ├── Azure-DocumentDB-Custom-State
│ │ │ ├── App_Start
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Azure-DocumentDB-Custom-State.csproj
│ │ │ ├── Controllers
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Dialogs
│ │ │ │ └── RootDialog.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── README.md
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ ├── Azure-Table-Custom-State
│ │ │ ├── App_Start
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Azure-Table-Custom-State.csproj
│ │ │ ├── Controllers
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Dialogs
│ │ │ │ └── RootDialog.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── README.md
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ ├── Custom-State-Sample.sln
│ │ └── README.md
│ ├── FacebookHandover
│ │ ├── FacebookHandover.sln
│ │ ├── FacebookModel
│ │ │ ├── FacebookPassThreadControl.cs
│ │ │ ├── FacebookPayload.cs
│ │ │ ├── FacebookPsid.cs
│ │ │ ├── FacebookRequestThreadControl.cs
│ │ │ ├── FacebookStandby.cs
│ │ │ ├── FacebookTakeThreadControl.cs
│ │ │ └── FacebookThreadControlHelper.cs
│ │ ├── Primary
│ │ │ ├── Bots
│ │ │ │ └── PrimaryBot.cs
│ │ │ ├── Controllers
│ │ │ │ └── BotController.cs
│ │ │ ├── DeploymentTemplates
│ │ │ │ ├── template-with-new-rg.json
│ │ │ │ └── template-with-preexisting-rg.json
│ │ │ ├── Primary.csproj
│ │ │ ├── Program.cs
│ │ │ ├── Properties
│ │ │ │ └── launchSettings.json
│ │ │ ├── Startup.cs
│ │ │ ├── appsettings.Development.json
│ │ │ ├── appsettings.json
│ │ │ └── wwwroot
│ │ │ │ └── default.htm
│ │ ├── README.md
│ │ └── Secondary
│ │ │ ├── Bots
│ │ │ └── SecondaryBot.cs
│ │ │ ├── Controllers
│ │ │ └── BotController.cs
│ │ │ ├── DeploymentTemplates
│ │ │ ├── template-with-new-rg.json
│ │ │ └── template-with-preexisting-rg.json
│ │ │ ├── Program.cs
│ │ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ │ ├── Secondary.csproj
│ │ │ ├── Startup.cs
│ │ │ ├── appsettings.Development.json
│ │ │ ├── appsettings.json
│ │ │ └── wwwroot
│ │ │ └── default.htm
│ ├── Luis-Scorable-QnA
│ │ ├── .gitignore
│ │ ├── Luis-Scorable-Qna.sln
│ │ └── Luis-Scorable-Qna
│ │ │ ├── App_Start
│ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers
│ │ │ └── MessagesController.cs
│ │ │ ├── Dialogs
│ │ │ ├── CommonResponsesDialog.cs
│ │ │ ├── CommonResponsesScorable.cs
│ │ │ ├── JokeDialog.cs
│ │ │ ├── LuisDialog.cs
│ │ │ ├── QnaDialog.cs
│ │ │ └── RootDialog.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── Luis-Scorable-Qna-Demo.csproj
│ │ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ ├── MockChannel
│ │ ├── App_Start
│ │ │ └── WebApiConfig.cs
│ │ ├── Controllers
│ │ │ └── MockChannelController.cs
│ │ ├── Global.asax
│ │ ├── Global.asax.cs
│ │ ├── MockChannel.csproj
│ │ ├── MockChannel.sln
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── README.md
│ │ ├── Web.Debug.config
│ │ ├── Web.Release.config
│ │ ├── Web.config
│ │ └── packages.config
│ ├── Qna-Rich-Cards
│ │ ├── Qna-Rich-Cards.sln
│ │ ├── Qna-Rich-Cards
│ │ │ ├── AnswerFormats
│ │ │ │ └── JsonQnaAnswer.cs
│ │ │ ├── App_Start
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Dialogs
│ │ │ │ ├── QnaDialog.cs
│ │ │ │ └── RootDialog.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── Qna-Rich-Cards.csproj
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ └── README.md
│ ├── ScorableBotSample
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── ScorableBot
│ │ │ ├── App_Start
│ │ │ │ └── WebApiConfig.cs
│ │ │ ├── Controllers
│ │ │ │ └── MessagesController.cs
│ │ │ ├── Dialogs
│ │ │ │ ├── Balance
│ │ │ │ │ ├── Current
│ │ │ │ │ │ └── CheckBalanceCurrentDialog.cs
│ │ │ │ │ ├── Savings
│ │ │ │ │ │ └── CheckBalanceSavingsDialog.cs
│ │ │ │ │ ├── ScorableCheckBalance.cs
│ │ │ │ │ └── ScorableCheckBalanceDialog.cs
│ │ │ │ ├── MakePayment
│ │ │ │ │ ├── ScorableMakePayment.cs
│ │ │ │ │ └── ScorableMakePaymentDialog.cs
│ │ │ │ └── RootDialog.cs
│ │ │ ├── Global.asax
│ │ │ ├── Global.asax.cs
│ │ │ ├── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── ScorableBot.csproj
│ │ │ ├── Web.Debug.config
│ │ │ ├── Web.Release.config
│ │ │ ├── Web.config
│ │ │ ├── default.htm
│ │ │ └── packages.config
│ │ └── ScorableBotSample.sln
│ └── TriviaBotSpeechSample
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── TriviaApp
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Assets
│ │ │ ├── Answer_2.png
│ │ │ ├── Answer_3.png
│ │ │ ├── Answer_4.png
│ │ │ ├── BG.png
│ │ │ ├── Chat_Categories.png
│ │ │ ├── Check_Left_2_Player_Only.png
│ │ │ ├── Check_Right.png
│ │ │ ├── Dash_No_Labels.png
│ │ │ ├── Dash_with_Labels.png
│ │ │ ├── Icon_Bot.png
│ │ │ ├── Icon_Mic.png
│ │ │ ├── Icon_User.png
│ │ │ ├── LargeTile.scale-100.png
│ │ │ ├── LargeTile.scale-125.png
│ │ │ ├── LargeTile.scale-150.png
│ │ │ ├── LargeTile.scale-200.png
│ │ │ ├── LargeTile.scale-400.png
│ │ │ ├── LockScreenLogo.scale-200.png
│ │ │ ├── ON_ALL.png
│ │ │ ├── ON_Animals.png
│ │ │ ├── ON_Art.png
│ │ │ ├── ON_Film.png
│ │ │ ├── ON_Geography.png
│ │ │ ├── ON_Music.png
│ │ │ ├── ON_Science.png
│ │ │ ├── SmallTile.scale-100.png
│ │ │ ├── SmallTile.scale-125.png
│ │ │ ├── SmallTile.scale-150.png
│ │ │ ├── SmallTile.scale-200.png
│ │ │ ├── SmallTile.scale-400.png
│ │ │ ├── SplashScreen.scale-100.png
│ │ │ ├── SplashScreen.scale-125.png
│ │ │ ├── SplashScreen.scale-150.png
│ │ │ ├── SplashScreen.scale-200.png
│ │ │ ├── SplashScreen.scale-400.png
│ │ │ ├── Square150x150Logo.scale-100.png
│ │ │ ├── Square150x150Logo.scale-125.png
│ │ │ ├── Square150x150Logo.scale-150.png
│ │ │ ├── Square150x150Logo.scale-200.png
│ │ │ ├── Square150x150Logo.scale-400.png
│ │ │ ├── Square44x44Logo.altform-unplated_targetsize-16.png
│ │ │ ├── Square44x44Logo.altform-unplated_targetsize-256.png
│ │ │ ├── Square44x44Logo.altform-unplated_targetsize-32.png
│ │ │ ├── Square44x44Logo.altform-unplated_targetsize-48.png
│ │ │ ├── Square44x44Logo.scale-100.png
│ │ │ ├── Square44x44Logo.scale-125.png
│ │ │ ├── Square44x44Logo.scale-150.png
│ │ │ ├── Square44x44Logo.scale-200.png
│ │ │ ├── Square44x44Logo.scale-400.png
│ │ │ ├── Square44x44Logo.targetsize-16.png
│ │ │ ├── Square44x44Logo.targetsize-24.png
│ │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ │ ├── Square44x44Logo.targetsize-256.png
│ │ │ ├── Square44x44Logo.targetsize-32.png
│ │ │ ├── Square44x44Logo.targetsize-48.png
│ │ │ ├── StoreLogo.png
│ │ │ ├── Trivia.png
│ │ │ ├── Wide310x150Logo.scale-100.png
│ │ │ ├── Wide310x150Logo.scale-125.png
│ │ │ ├── Wide310x150Logo.scale-150.png
│ │ │ ├── Wide310x150Logo.scale-200.png
│ │ │ ├── Wide310x150Logo.scale-400.png
│ │ │ └── X_Left.png
│ │ ├── BotConnection.cs
│ │ ├── Converters
│ │ │ └── BoolToVisibilityConverter.cs
│ │ ├── MainPage.xaml
│ │ ├── MainPage.xaml.cs
│ │ ├── Package.appxmanifest
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── Default.rd.xml
│ │ ├── TriviaApp.csproj
│ │ ├── ViewModels
│ │ │ ├── AnswerCard.cs
│ │ │ ├── ChatCard.cs
│ │ │ ├── CountdownTimer.cs
│ │ │ └── ObservableDictionary.cs
│ │ ├── packages.config
│ │ └── project.json
│ │ ├── TriviaBot
│ │ ├── App_Start
│ │ │ └── WebApiConfig.cs
│ │ ├── Assets
│ │ │ ├── Trivia.png
│ │ │ ├── a_sunshine_intro_09.wav
│ │ │ ├── tv_gameshow_bell_01.wav
│ │ │ └── tv_gameshow_buzzer_03.wav
│ │ ├── Controllers
│ │ │ └── MessagesController.cs
│ │ ├── Global.asax
│ │ ├── Global.asax.cs
│ │ ├── Luis
│ │ │ ├── LuisEntity.cs
│ │ │ ├── LuisIntent.cs
│ │ │ ├── LuisResult.cs
│ │ │ └── QueryLuis.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Runtime
│ │ │ ├── BotState.cs
│ │ │ ├── Categories.cs
│ │ │ ├── EnumExtensions.cs
│ │ │ ├── Extensions.cs
│ │ │ ├── Responses.cs
│ │ │ ├── SsmlWrapper.cs
│ │ │ ├── TriviaResponse.cs
│ │ │ └── Utility.cs
│ │ ├── Shared
│ │ │ ├── AppEntities.cs
│ │ │ └── MessageType.cs
│ │ ├── TriviaBot.csproj
│ │ ├── TriviaDialog.cs
│ │ ├── Web.Debug.config
│ │ ├── Web.Release.config
│ │ ├── Web.config
│ │ ├── default.htm
│ │ └── packages.config
│ │ ├── TriviaBotLU.json
│ │ └── TriviaBotSpeechSample.sln
├── Node
│ ├── Blog-CustomSTate-CosmosDB
│ │ └── package-lock.json
│ ├── Blog-CustomState-CosmosDB
│ │ ├── README.md
│ │ ├── app.js
│ │ └── package.json
│ ├── Blog-Qna-Attachments
│ │ ├── README.md
│ │ ├── app.js
│ │ ├── package-lock.json
│ │ └── package.json
│ └── Blog-Redux-Bot
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── app.js
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── public
│ │ └── index.html
│ │ └── redux
│ │ ├── conversationActions.js
│ │ ├── dialogActions.js
│ │ ├── loadStore.js
│ │ ├── reducer.js
│ │ └── sagas
│ │ ├── default.js
│ │ └── dialog.js
├── README.md
└── images
│ ├── app-insights-metrics.png
│ ├── bot-channels-ngrok.png
│ ├── direct-line-secret-url.png
│ ├── ngrok-forward.png
│ ├── qna-portal.png
│ ├── qna-rich-cards.png
│ ├── redux-abs-logo.png
│ ├── redux-bot-02.png
│ ├── redux-store-02.png
│ └── suggested-actions-feedback.png
├── docs-samples
├── CSharp
│ └── Simple-LUIS-Notes-Sample
│ │ ├── Notes.json
│ │ ├── Simple-LUIS-Notes-Sample.sln
│ │ ├── Simple-LUIS-Notes-Sample
│ │ ├── App_Start
│ │ │ └── WebApiConfig.cs
│ │ ├── Controllers
│ │ │ └── MessagesController.cs
│ │ ├── Dialogs
│ │ │ └── SimpleNoteDialog.cs
│ │ ├── Global.asax
│ │ ├── Global.asax.cs
│ │ ├── NotesBot.csproj
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Web.Debug.config
│ │ ├── Web.Release.config
│ │ ├── Web.config
│ │ ├── default.htm
│ │ └── packages.config
│ │ ├── VSIX
│ │ ├── BotBuilderVSIX_V3.zip
│ │ └── readme.md
│ │ ├── images
│ │ ├── bot-builder-dotnet-luis-message-flow-bot-code-notes.png
│ │ ├── dotnet-notes-sample-emulator.png
│ │ └── notes-sample-emulator.png
│ │ └── readme.md
├── Node
│ └── basics-naturalLanguage
│ │ ├── Notes.json
│ │ ├── basicNote-intentDialog.js
│ │ ├── basicNote.js
│ │ ├── images
│ │ ├── bot-builder-nodejs-luis-message-flow-bot-code-notes.png
│ │ ├── bot-builder-nodejs-use-luis-create-note-interruption.png
│ │ ├── bot-builder-nodejs-use-luis-create-note-output.png
│ │ └── bot-builder-nodejs-use-luis-read-note-output.png
│ │ └── readme.md
├── README.md
├── V4
│ └── JS
│ │ └── contosocafebot-luis-dialogs
│ │ ├── .gitignore
│ │ ├── .vscode
│ │ └── launch.json
│ │ ├── cafeLUISModel.json
│ │ ├── graphics
│ │ └── run-bot.png
│ │ ├── lib
│ │ ├── CafeLUISModel.d.ts
│ │ ├── CafeLUISModel.js
│ │ ├── CafeLUISModel.js.map
│ │ ├── luisbot.d.ts
│ │ ├── luisbot.js
│ │ └── luisbot.js.map
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── readme.md
│ │ ├── src
│ │ ├── .vscode
│ │ │ └── launch.json
│ │ ├── CafeLUISModel.ts
│ │ └── luisbot.ts
│ │ └── tsconfig.json
├── v3Node
│ └── startNewDialog
│ │ └── botadapter.js
└── web-chat-speech
│ ├── index.html
│ ├── readme.md
│ └── webchat-sample-speech.png
└── swagger
├── ConnectorAPI.json
└── StateAPI.json
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Bot Framework Samples
2 | This repo contains samples that are specifically used in the blog posts. You can find additional [SDK V4](https://github.com/Microsoft/BotBuilder-Samples/tree/master/samples) and [SDK V3](https://github.com/Microsoft/BotBuilder-Samples/tree/v3-sdk-samples) in the BotBuilder-Samples repo.
3 |
4 | ## Contributing
5 |
6 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
7 |
--------------------------------------------------------------------------------
/SDKV4-Samples/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/SDKV4-Samples/README.md:
--------------------------------------------------------------------------------
1 | # Bot Framework Samples
2 |
3 | This branch is for Bot Builder SDK V4 samples used in the documentation.
4 |
5 | ## Contributing
6 |
7 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
8 |
--------------------------------------------------------------------------------
/SDKV4-Samples/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/ComplexDialogBot/BotBuilder.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/ComplexDialogBot/ComplexDialogBot.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 | BotBuilder.ruleset
6 |
7 |
8 |
9 |
10 | Always
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/ComplexDialogBot/DeploymentScripts/MsbotClone/bot.recipe:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "resources": [
4 | {
5 | "type": "endpoint",
6 | "id": "24",
7 | "name": "Sample",
8 | "url": "http://localhost:3978/api/messages"
9 | },
10 | {
11 | "type": "endpoint",
12 | "id": "2",
13 | "name": "production",
14 | "url": "https://your-bot-url.azurewebsites.net/api/messages"
15 | },
16 | {
17 | "type": "abs",
18 | "id": "3",
19 | "name": "complex-dialog-Bot"
20 | },
21 | {
22 | "type": "appInsights",
23 | "id": "4",
24 | "name": "complex-dialog-Insights"
25 | },
26 | {
27 | "type": "blob",
28 | "id": "5",
29 | "name": "complex-dialog-Blob",
30 | "container": "botstatestore"
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/ComplexDialogBot/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:3978/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "_5.MultiTurn_Prompts_Bot": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:3978/"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/ComplexDialogBot/UserProfile.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Licensed under the MIT License.
3 |
4 | namespace Microsoft.BotBuilderSamples
5 | {
6 | using System.Collections.Generic;
7 |
8 | /// Contains information about a user.
9 | public class UserProfile
10 | {
11 | /// Gets or sets the user's name.
12 | /// The user's name.
13 | public string Name { get; set; }
14 |
15 | /// Gets or sets the user's age.
16 | /// The user's age.
17 | public int Age { get; set; }
18 |
19 | /// Gets or sets the list of companies the user wants to review.
20 | /// The list of companies the user wants to review.
21 | public List CompaniesToReview { get; set; } = new List();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/ComplexDialogBot/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "botFilePath": "complex-dialog.bot",
3 | "botFileSecret": ""
4 | }
5 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/ComplexDialogBot/complex-dialog.bot:
--------------------------------------------------------------------------------
1 | {
2 | "name": "complex-dialog-bot",
3 | "services": [
4 | {
5 | "type": "endpoint",
6 | "name": "development",
7 | "endpoint": "http://localhost:3978/api/messages",
8 | "appId": "",
9 | "appPassword": "",
10 | "id": "24"
11 | }
12 | ],
13 | "padlock": "",
14 | "version": "2.0"
15 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/BotBuilder.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DeploymentScripts/MsbotClone/bot.recipe:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "resources": [
4 | {
5 | "type": "endpoint",
6 | "id": "24",
7 | "name": "Sample",
8 | "url": "http://localhost:3978/api/messages"
9 | },
10 | {
11 | "type": "endpoint",
12 | "id": "2",
13 | "name": "production",
14 | "url": "https://your-bot-url.azurewebsites.net/api/messages"
15 | },
16 | {
17 | "type": "abs",
18 | "id": "3",
19 | "name": "complex-dialog-Bot"
20 | },
21 | {
22 | "type": "appInsights",
23 | "id": "4",
24 | "name": "complex-dialog-Insights"
25 | },
26 | {
27 | "type": "blob",
28 | "id": "5",
29 | "name": "complex-dialog-Blob",
30 | "container": "botstatestore"
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/DialogInterruptionsBot.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 | BotBuilder.ruleset
6 | Microsoft.BotBuilderSamples
7 |
8 |
9 |
10 |
11 | Always
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:3978/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "DialogInterruptions_Sample": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:3978/"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/UserProfile.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Licensed under the MIT License.
3 |
4 | namespace Microsoft.BotBuilderSamples
5 | {
6 | using System.Collections.Generic;
7 |
8 | /// Contains information about a user.
9 | public class UserProfile
10 | {
11 | /// Gets or sets the user's name.
12 | /// The user's name.
13 | public string Name { get; set; }
14 |
15 | /// Gets or sets the user's age.
16 | /// The user's age.
17 | public int Age { get; set; }
18 |
19 | /// Gets or sets the list of companies the user wants to review.
20 | /// The list of companies the user wants to review.
21 | public List CompaniesToReview { get; set; } = new List();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "botFilePath": "dialog-interruptions.bot",
3 | "botFileSecret": ""
4 | }
5 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogInterruptionsBot/dialog-interruptions.bot:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dialog-interruptions-bot",
3 | "services": [
4 | {
5 | "type": "endpoint",
6 | "name": "development",
7 | "endpoint": "http://localhost:3978/api/messages",
8 | "appId": "",
9 | "appPassword": "",
10 | "id": "24"
11 | }
12 | ],
13 | "padlock": "",
14 | "version": "2.0"
15 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogPromptBot/DeploymentScripts/MsbotClone/bot.recipe:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "resources": [
4 | {
5 | "type": "endpoint",
6 | "id": "1",
7 | "name": "development",
8 | "url": "http://localhost:3978/api/messages"
9 | },
10 | {
11 | "type": "endpoint",
12 | "id": "2",
13 | "name": "production",
14 | "url": "https://your-bot-url.azurewebsites.net/api/messages"
15 | },
16 | {
17 | "type": "abs",
18 | "id": "3",
19 | "name": "DialogPromptBot-abs"
20 | },
21 | {
22 | "type": "appInsights",
23 | "id": "4",
24 | "name": "DialogPromptBot-insights"
25 | },
26 | {
27 | "type": "blob",
28 | "id": "5",
29 | "name": "DialogPromptBot-blob",
30 | "container": "botstatestore"
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogPromptBot/DialogPromptBot.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogPromptBot/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:3978/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "PromptsBot": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:3978/"
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogPromptBot/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "botFilePath": "dialog-prompt.bot",
3 | "botFileSecret": ""
4 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/DialogPromptBot/dialog-prompt.bot:
--------------------------------------------------------------------------------
1 | {
2 | "name": "PromptsBot",
3 | "services": [
4 | {
5 | "type": "endpoint",
6 | "name": "development",
7 | "endpoint": "http://localhost:3978/api/messages",
8 | "appId": "",
9 | "appPassword": "",
10 | "id": "1"
11 | }
12 | ],
13 | "padlock": "",
14 | "version": "2.0"
15 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/PromptUsersForInput/ConversationFlow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 |
6 | namespace Microsoft.BotBuilderSamples
7 | {
8 | public class ConversationFlow
9 | {
10 | // Identifies the last question asked.
11 | public enum Question
12 | {
13 | Name,
14 | Age,
15 | Date,
16 | None, // Our last action did not involve a question.
17 | }
18 |
19 | // The last question asked.
20 | public Question LastQuestionAsked { get; set; } = Question.None;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/PromptUsersForInput/CustomPromptBot.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/PromptUsersForInput/DeploymentScripts/MsbotClone/bot.recipe:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "resources": [
4 | {
5 | "type": "endpoint",
6 | "id": "1",
7 | "name": "development",
8 | "url": "http://localhost:3978/api/messages"
9 | },
10 | {
11 | "type": "endpoint",
12 | "id": "2",
13 | "name": "production",
14 | "url": "https://your-bot-url.azurewebsites.net/api/messages"
15 | },
16 | {
17 | "type": "abs",
18 | "id": "3",
19 | "name": "CustomPromptBot-abs"
20 | },
21 | {
22 | "type": "appInsights",
23 | "id": "4",
24 | "name": "CustomPromptBot-insights"
25 | },
26 | {
27 | "type": "blob",
28 | "id": "5",
29 | "name": "CustomPromptBot-blob",
30 | "container": "botstatestore"
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/PromptUsersForInput/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:3978/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "Bot_Builder_Echo_Bot_V43": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:3978/"
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/PromptUsersForInput/UserProfile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 |
6 | namespace Microsoft.BotBuilderSamples
7 | {
8 | public class UserProfile
9 | {
10 | public string Name { get; set; }
11 |
12 | public int? Age { get; set; }
13 |
14 | public string Date { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/PromptUsersForInput/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "botFilePath": "custom-prompt.bot",
3 | "botFileSecret": ""
4 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/PromptUsersForInput/custom-prompt.bot:
--------------------------------------------------------------------------------
1 | {
2 | "name": "CustomPromptBot",
3 | "services": [
4 | {
5 | "type": "endpoint",
6 | "name": "development",
7 | "endpoint": "http://localhost:3978/api/messages",
8 | "appId": "",
9 | "appPassword": "",
10 | "id": "1"
11 | }
12 | ],
13 | "padlock": "",
14 | "version": "2.0"
15 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/StateBot/ConversationData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 |
6 | namespace Microsoft.BotBuilderSamples
7 | {
8 | // Defines a state property used to track conversation data.
9 | public class ConversationData
10 | {
11 | // The time-stamp of the most recent incoming message.
12 | public string Timestamp { get; set; }
13 |
14 | // The ID of the user's channel.
15 | public string ChannelId { get; set; }
16 |
17 | // Track whether we have already asked the user's name
18 | public bool PromptedUserForName { get; set; } = false;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/StateBot/DeploymentScripts/MsbotClone/bot.recipe:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "resources": [
4 | {
5 | "type": "endpoint",
6 | "id": "1",
7 | "name": "development",
8 | "url": "http://localhost:3978/api/messages"
9 | },
10 | {
11 | "type": "endpoint",
12 | "id": "2",
13 | "name": "production",
14 | "url": "https://your-bot-url.azurewebsites.net/api/messages"
15 | },
16 | {
17 | "type": "abs",
18 | "id": "3",
19 | "name": "StateBot-abs"
20 | },
21 | {
22 | "type": "appInsights",
23 | "id": "4",
24 | "name": "StateBot-insights"
25 | },
26 | {
27 | "type": "blob",
28 | "id": "5",
29 | "name": "StateBot-blob",
30 | "container": "botstatestore"
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/StateBot/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:3978/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "StateBot": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:3978/"
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/StateBot/StateBot.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/StateBot/StateBot.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27428.2043
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StateBot", "StateBot.csproj", "{70EECF7F-1978-4587-9E6D-6371EC3A727B}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {70EECF7F-1978-4587-9E6D-6371EC3A727B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {70EECF7F-1978-4587-9E6D-6371EC3A727B}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {70EECF7F-1978-4587-9E6D-6371EC3A727B}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {70EECF7F-1978-4587-9E6D-6371EC3A727B}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {D6A9E094-666B-42FD-A3C9-2929F55D978E}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/StateBot/UserProfile.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft Corporation. All rights reserved.
2 | // Licensed under the MIT License.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Threading.Tasks;
8 |
9 | namespace Microsoft.BotBuilderSamples
10 | {
11 | // Defines a state property used to track information about the user.
12 | public class UserProfile
13 | {
14 | public string Name { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/StateBot/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "botFilePath": "state.bot",
3 | "botFileSecret": ""
4 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/StateBot/state.bot:
--------------------------------------------------------------------------------
1 | {
2 | "name": "StateBot",
3 | "services": [
4 | {
5 | "type": "endpoint",
6 | "name": "development",
7 | "endpoint": "http://localhost:3978/api/messages",
8 | "appId": "",
9 | "appPassword": "",
10 | "id": "1"
11 | }
12 | ],
13 | "padlock": "",
14 | "version": "2.0"
15 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/dotnet_core/nlp-with-dispatch/QnAMaker.tsv:
--------------------------------------------------------------------------------
1 | Question Answer Source Metadata
2 | hi Hello! QnAMaker.tsv
3 | greetings Hello! QnAMaker.tsv
4 | good morning Hello! QnAMaker.tsv
5 | good evening Hello! QnAMaker.tsv
6 | What are you? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
7 | What? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
8 | What do you do? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
9 | Who are you? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
10 | What is your name? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
11 | What should I call you? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
12 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/DialogPromptBot/.env:
--------------------------------------------------------------------------------
1 | botFilePath=dialog-prompt.bot
2 | botFileSecret=
3 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/DialogPromptBot/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extends": "standard",
3 | "rules": {
4 | "semi": [2, "always"],
5 | "indent": [2, 4],
6 | "no-return-await": 0,
7 | "space-before-function-paren": [2, {
8 | "named": "never",
9 | "anonymous": "never",
10 | "asyncArrow": "always"
11 | }],
12 | "template-curly-spacing": [2, "always"]
13 | }
14 | };
--------------------------------------------------------------------------------
/SDKV4-Samples/js/DialogPromptBot/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
--------------------------------------------------------------------------------
/SDKV4-Samples/js/DialogPromptBot/deploymentScripts/msbotClone/bot.recipe:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "resources": [
4 | {
5 | "type": "endpoint",
6 | "id": "1",
7 | "name": "development",
8 | "url": "http://localhost:3978/api/messages"
9 | },
10 | {
11 | "type": "endpoint",
12 | "id": "2",
13 | "name": "production",
14 | "url": "https://your-bot-url.azurewebsites.net/api/messages"
15 | },
16 | {
17 | "type": "abs",
18 | "id": "3",
19 | "name": "DialogPromptBot-abs"
20 | },
21 | {
22 | "type": "appInsights",
23 | "id": "4",
24 | "name": "DialogPromptBot-insights"
25 | },
26 | {
27 | "type": "blob",
28 | "id": "5",
29 | "name": "DialogPromptBot-blob",
30 | "container": "botstatestore"
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/js/DialogPromptBot/dialog-prompt.bot:
--------------------------------------------------------------------------------
1 | {
2 | "name": "DialogPromptBot",
3 | "services": [
4 | {
5 | "type": "endpoint",
6 | "name": "development",
7 | "endpoint": "http://localhost:3978/api/messages",
8 | "appId": "",
9 | "appPassword": "",
10 | "id": "1"
11 | }
12 | ],
13 | "padlock": "",
14 | "version": "2.0"
15 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/js/DialogPromptBot/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dialog-prompt-bot",
3 | "version": "1.0.0",
4 | "description": "Bot from the prompt-users-using-dialogs topic",
5 | "author": "Microsoft Bot Builder Yeoman Generator v4.0.10",
6 | "license": "MIT",
7 | "main": "index.js",
8 | "scripts": {
9 | "test": "echo \"Error: no test specified\" && exit 1",
10 | "build": "echo \"Error: no build specified\" && exit 1",
11 | "start": "node ./index.js",
12 | "watch": "nodemon ./index.js"
13 | },
14 | "dependencies": {
15 | "botbuilder": "^4.2.1",
16 | "botbuilder-dialogs": "^4.2.1",
17 | "botframework-config": "^4.1.5",
18 | "dotenv": "^6.0.0",
19 | "restify": "^6.3.4"
20 | },
21 | "devDependencies": {
22 | "eslint": "^5.6.0",
23 | "eslint-config-standard": "^12.0.0",
24 | "eslint-plugin-import": "^2.14.0",
25 | "eslint-plugin-node": "^7.0.1",
26 | "eslint-plugin-promise": "^4.0.1",
27 | "eslint-plugin-standard": "^4.0.0",
28 | "nodemon": "^1.18.4",
29 | "@types/node": "10.10.2",
30 | "@types/restify": "7.2.4"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/PromptUsersForInput/.env:
--------------------------------------------------------------------------------
1 | botFilePath=simplePrompts.bot
2 | botFileSecret=
3 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/PromptUsersForInput/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extends": "standard",
3 | "rules": {
4 | "semi": [2, "always"],
5 | "indent": [2, 4],
6 | "no-return-await": 0,
7 | "space-before-function-paren": [2, {
8 | "named": "never",
9 | "anonymous": "never",
10 | "asyncArrow": "always"
11 | }],
12 | "template-curly-spacing": [2, "always"]
13 | }
14 | };
--------------------------------------------------------------------------------
/SDKV4-Samples/js/PromptUsersForInput/deploymentScripts/msbotClone/bot.recipe:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "resources": [
4 | {
5 | "type": "endpoint",
6 | "id": "1",
7 | "name": "development",
8 | "url": "http://localhost:3978/api/messages"
9 | },
10 | {
11 | "type": "endpoint",
12 | "id": "2",
13 | "name": "production",
14 | "url": "https://your-bot-url.azurewebsites.net/api/messages"
15 | },
16 | {
17 | "type": "abs",
18 | "id": "3",
19 | "name": "simplePrompts-abs"
20 | },
21 | {
22 | "type": "appInsights",
23 | "id": "4",
24 | "name": "simplePrompts-insights"
25 | },
26 | {
27 | "type": "blob",
28 | "id": "5",
29 | "name": "simplePrompts-blob",
30 | "container": "botstatestore"
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/js/PromptUsersForInput/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "simplePrompts",
3 | "version": "1.0.0",
4 | "description": "Sample code for Create your own prompts to gather user input",
5 | "author": "Microsoft Bot Builder Yeoman Generator v4.0.10",
6 | "license": "MIT",
7 | "main": "index.js",
8 | "scripts": {
9 | "test": "echo \"Error: no test specified\" && exit 1",
10 | "build": "echo \"Error: no build specified\" && exit 1",
11 | "start": "node ./index.js",
12 | "watch": "nodemon ./index.js"
13 | },
14 | "dependencies": {
15 | "@microsoft/recognizers-text-suite": "^1.1.4",
16 | "botbuilder": "^4.0.6",
17 | "botframework-config": "^4.0.6",
18 | "dotenv": "^6.0.0",
19 | "restify": "^6.3.4"
20 | },
21 | "devDependencies": {
22 | "eslint": "^5.6.0",
23 | "eslint-config-standard": "^12.0.0",
24 | "eslint-plugin-import": "^2.14.0",
25 | "eslint-plugin-node": "^7.0.1",
26 | "eslint-plugin-promise": "^4.0.1",
27 | "eslint-plugin-standard": "^4.0.0",
28 | "nodemon": "^1.18.4",
29 | "@types/node": "10.10.2",
30 | "@types/restify": "7.2.4"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/PromptUsersForInput/resources/echo.chat:
--------------------------------------------------------------------------------
1 | user=Vishwac
2 | bot=EchoBot
3 |
4 | user: Hi
5 | bot: 1: You said "Hi"
6 | user: Hello
7 | bot: 2: You said "Hello"
8 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/PromptUsersForInput/simplePrompts.bot:
--------------------------------------------------------------------------------
1 | {
2 | "name": "simplePrompts",
3 | "services": [
4 | {
5 | "type": "endpoint",
6 | "name": "development",
7 | "endpoint": "http://localhost:3978/api/messages",
8 | "appId": "",
9 | "appPassword": "",
10 | "id": "1"
11 | }
12 | ],
13 | "padlock": "",
14 | "version": "2.0"
15 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/js/complexDialogBot/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extends": "standard",
3 | "rules": {
4 | "semi": [2, "always"],
5 | "indent": [2, 4],
6 | "no-return-await": 0,
7 | "space-before-function-paren": [2, {
8 | "named": "never",
9 | "anonymous": "never",
10 | "asyncArrow": "always"
11 | }],
12 | "template-curly-spacing": [2, "always"]
13 | }
14 | };
--------------------------------------------------------------------------------
/SDKV4-Samples/js/complexDialogBot/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
--------------------------------------------------------------------------------
/SDKV4-Samples/js/complexDialogBot/deploymentScripts/msbotClone/bot.recipe:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "resources": [
4 | {
5 | "type": "endpoint",
6 | "id": "1",
7 | "name": "development",
8 | "url": "http://localhost:3978/api/messages"
9 | },
10 | {
11 | "type": "endpoint",
12 | "id": "2",
13 | "name": "production",
14 | "url": "https://your-bot-url.azurewebsites.net/api/messages"
15 | },
16 | {
17 | "type": "abs",
18 | "id": "3",
19 | "name": "ComplexDialogBot-abs"
20 | },
21 | {
22 | "type": "appInsights",
23 | "id": "4",
24 | "name": "ComplexDialogBot-insights"
25 | },
26 | {
27 | "type": "blob",
28 | "id": "5",
29 | "name": "ComplexDialogBot-blob",
30 | "container": "botstatestore"
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/js/complexDialogBot/iisnode.yml:
--------------------------------------------------------------------------------
1 | nodeProcessCommandLine: "D:\Program Files (x86)\nodejs\8.9.4\node.exe"
--------------------------------------------------------------------------------
/SDKV4-Samples/js/complexDialogBot/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ComplexDialogBot",
3 | "version": "1.0.0",
4 | "description": "Sample code for the how to topic for creating advanced conversation flow",
5 | "author": "Microsoft Bot Builder Yeoman Generator v4.0.10",
6 | "license": "MIT",
7 | "main": "index.js",
8 | "scripts": {
9 | "test": "echo \"Error: no test specified\" && exit 1",
10 | "build": "echo \"Error: no build specified\" && exit 1",
11 | "start": "node ./index.js",
12 | "watch": "nodemon ./index.js"
13 | },
14 | "dependencies": {
15 | "botbuilder": "^4.0.6",
16 | "botbuilder-dialogs": "^4.2.0-preview.2251",
17 | "botframework-config": "^4.0.6",
18 | "dotenv": "^6.0.0",
19 | "restify": "^6.3.4"
20 | },
21 | "devDependencies": {
22 | "eslint": "^5.6.0",
23 | "eslint-config-standard": "^12.0.0",
24 | "eslint-plugin-import": "^2.14.0",
25 | "eslint-plugin-node": "^7.0.1",
26 | "eslint-plugin-promise": "^4.0.1",
27 | "eslint-plugin-standard": "^4.0.0",
28 | "nodemon": "^1.18.4",
29 | "@types/node": "10.10.2",
30 | "@types/restify": "7.2.4"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/nlp-with-dispatch/QnAMaker.tsv:
--------------------------------------------------------------------------------
1 | Question Answer Source Metadata
2 | hi Hello! QnAMaker.tsv
3 | greetings Hello! QnAMaker.tsv
4 | good morning Hello! QnAMaker.tsv
5 | good evening Hello! QnAMaker.tsv
6 | What are you? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
7 | What? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
8 | What do you do? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
9 | Who are you? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
10 | What is your name? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
11 | What should I call you? I am the LUIS-QnAMaker Dispatch bot! This sample demonstrates using several LUIS applications and QnA Maker knowledge base using dispatch. QnAMaker.tsv
12 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/stateBot/.env:
--------------------------------------------------------------------------------
1 | botFilePath=stateBot.bot
2 | botFileSecret=
3 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/stateBot/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extends": "standard",
3 | "rules": {
4 | "semi": [2, "always"],
5 | "indent": [2, 4],
6 | "no-return-await": 0,
7 | "space-before-function-paren": [2, {
8 | "named": "never",
9 | "anonymous": "never",
10 | "asyncArrow": "always"
11 | }],
12 | "template-curly-spacing": [2, "always"]
13 | }
14 | };
--------------------------------------------------------------------------------
/SDKV4-Samples/js/stateBot/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .env
--------------------------------------------------------------------------------
/SDKV4-Samples/js/stateBot/deploymentScripts/msbotClone/bot.recipe:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "resources": [
4 | {
5 | "type": "endpoint",
6 | "id": "1",
7 | "name": "development",
8 | "url": "http://localhost:3978/api/messages"
9 | },
10 | {
11 | "type": "endpoint",
12 | "id": "2",
13 | "name": "production",
14 | "url": "https://your-bot-url.azurewebsites.net/api/messages"
15 | },
16 | {
17 | "type": "abs",
18 | "id": "3",
19 | "name": "stateBot-abs"
20 | },
21 | {
22 | "type": "appInsights",
23 | "id": "4",
24 | "name": "stateBot-insights"
25 | },
26 | {
27 | "type": "blob",
28 | "id": "5",
29 | "name": "stateBot-blob",
30 | "container": "botstatestore"
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/SDKV4-Samples/js/stateBot/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "stateBot",
3 | "version": "1.0.0",
4 | "description": "Demonstrates how to set up user and conversation state.",
5 | "author": "Microsoft Bot Builder Yeoman Generator v4.0.10",
6 | "license": "MIT",
7 | "main": "index.js",
8 | "scripts": {
9 | "test": "echo \"Error: no test specified\" && exit 1",
10 | "build": "echo \"Error: no build specified\" && exit 1",
11 | "start": "node ./index.js",
12 | "watch": "nodemon ./index.js"
13 | },
14 | "dependencies": {
15 | "botbuilder": "^4.0.6",
16 | "botframework-config": "^4.0.6",
17 | "dotenv": "^6.0.0",
18 | "restify": "^6.3.4"
19 | },
20 | "devDependencies": {
21 | "eslint": "^5.6.0",
22 | "eslint-config-standard": "^12.0.0",
23 | "eslint-plugin-import": "^2.14.0",
24 | "eslint-plugin-node": "^7.0.1",
25 | "eslint-plugin-promise": "^4.0.1",
26 | "eslint-plugin-standard": "^4.0.0",
27 | "nodemon": "^1.18.4",
28 | "@types/node": "10.10.2",
29 | "@types/restify": "7.2.4"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/stateBot/resources/echo.chat:
--------------------------------------------------------------------------------
1 | user=Vishwac
2 | bot=EchoBot
3 |
4 | user: Hi
5 | bot: 1: You said "Hi"
6 | user: Hello
7 | bot: 2: You said "Hello"
8 |
--------------------------------------------------------------------------------
/SDKV4-Samples/js/stateBot/stateBot.bot:
--------------------------------------------------------------------------------
1 | {
2 | "name": "stateBot",
3 | "services": [
4 | {
5 | "type": "endpoint",
6 | "name": "development",
7 | "endpoint": "http://localhost:3978/api/messages",
8 | "appId": "",
9 | "appPassword": "",
10 | "id": "1"
11 | }
12 | ],
13 | "padlock": "",
14 | "version": "2.0"
15 | }
--------------------------------------------------------------------------------
/StackOverflow-Bot/DialogAnalyzerFunc/DialogAnalyzerFunc.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net461
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | PreserveNewest
16 |
17 |
18 | PreserveNewest
19 | Never
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/StackOverflow-Bot/DialogAnalyzerFunc/Extensions/EnumerableExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 |
6 | namespace DialogAnalyzerFunc.Extensions
7 | {
8 | public static class EnumerableExtensions
9 | {
10 | public static IEnumerable> ToTuples(this IEnumerable values)
11 | {
12 | if (values.Count() % 2 != 0)
13 | {
14 | throw new ArgumentException("Values does not have an even number of items.");
15 | }
16 |
17 | List> results = new List>();
18 |
19 | if (values.Count() == 0)
20 | {
21 | return results;
22 | }
23 |
24 | for (int index = 0; index < values.Count(); index += 2)
25 | {
26 | results.Add(new Tuple(values.ElementAt(index), values.ElementAt(index + 1)));
27 | }
28 |
29 | return results;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/StackOverflow-Bot/DialogAnalyzerFunc/Models/TextAnalyticsResult.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 |
4 | namespace DialogAnalyzerFunc.Models
5 | {
6 | [DataContract]
7 | public class TextAnalyticsResult
8 | {
9 | [DataMember(Name = "documents")]
10 | public T[] Results { get; set; }
11 | }
12 |
13 | [DataContract]
14 | public class TextAnalyticsKeyPhrasesResult
15 | {
16 | [DataMember(Name = "id")]
17 | public string Id { get; set; }
18 |
19 | [DataMember(Name = "keyPhrases")]
20 | public string[] KeyPhrases { get; set; }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/StackOverflow-Bot/DialogAnalyzerFunc/Utilities/StringUtility.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | namespace DialogAnalyzerFunc.Utilities
6 | {
7 | public static class StringUtility
8 | {
9 | ///
10 | /// Get combined text with delimeter or default value
11 | ///
12 | public static string GetTextOrDefault(IEnumerable values, string defaultValue, string delim = ", ")
13 | {
14 | if (values?.Count() > 0 == false || values.All(v => string.IsNullOrEmpty(v) == true))
15 | {
16 | return defaultValue;
17 | }
18 |
19 | values = values.Where(v => string.IsNullOrEmpty(v) == false);
20 |
21 | return string.Join(delim, values).Trim();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/StackOverflow-Bot/DialogAnalyzerFunc/host.json:
--------------------------------------------------------------------------------
1 | {
2 | }
--------------------------------------------------------------------------------
/StackOverflow-Bot/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2017 Microsoft Corporation
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:8-onbuild
2 | EXPOSE 3978
3 | RUN npm install
4 | CMD ["npm", "run", "start"]
5 |
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/dialogs/brain.js:
--------------------------------------------------------------------------------
1 | module.exports = () => {
2 | bot.dialog('sobot:brain', [
3 | async (session) => {
4 | session.send("Here are the Cognitive services that I use to help you today...");
5 | var servicesMessage = attachments.buildCongitiveServicesMessageWithAttachments(session);
6 | return session.endDialog(servicesMessage);
7 | }
8 | ]).triggerAction({
9 | matches: 'Brain'
10 | });
11 | }
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/dialogs/joke.js:
--------------------------------------------------------------------------------
1 | module.exports = () => {
2 | // Tells the user a fun joke.
3 | bot.dialog('sobot:joke', [
4 | (session) => {
5 | session.send("Here's a fun joke… 🙃");
6 | tellAJoke(session);
7 | session.endDialog("Feel free to ask me another question, or even ask for a joke!");
8 | return;
9 | }
10 | ]).triggerAction({
11 | matches: ['Joke', /^Brighten my day/i]
12 | });
13 |
14 | const tellAJoke = (session) => {
15 | let usedJoke = pickAJoke(jokes.items);
16 | session.send(usedJoke);
17 | return;
18 | }
19 |
20 | const pickAJoke = (jokes) => {
21 | let randomIndex = getRandomInt(0, jokes.length);
22 | return jokes[randomIndex].body_markdown;
23 | }
24 |
25 | const getRandomInt = (min, max) => {
26 | min = Math.ceil(min);
27 | max = Math.floor(max);
28 | return Math.floor(Math.random() * (max - min + 1)) + min;
29 | }
30 | }
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/dialogs/keywordPrompt.js:
--------------------------------------------------------------------------------
1 | module.exports = () => {
2 | // Ask the user what they'd like to look for.
3 | bot.dialog('sobot:keywordPrompt', [
4 | async (session, args) => {
5 | session.sendTyping();
6 | builder.Prompts.text(session, 'What would you like me to search for?');
7 | },
8 | async (session, results) => {
9 | session.sendTyping();
10 | bingSearchQuery(session, { query: cleanQueryString(results.response, false) });
11 | }
12 | ]).triggerAction({
13 | matches: [/I want to ask a question|Search/i]
14 | });
15 | }
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/dialogs/languages.js:
--------------------------------------------------------------------------------
1 | module.exports = () => {
2 | // This bot can speak *all* languages!
3 | bot.dialog('sobot:languages', [
4 | async (session) => {
5 | session.endDialog("Hmm…. I speak JavaScript, SQL, Java, C#, Python, and more...");
6 | }
7 | ]).triggerAction({
8 | matches: 'Languages'
9 | });
10 | }
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/dialogs/menu.js:
--------------------------------------------------------------------------------
1 | module.exports = () => {
2 | // Shows off a menu with all the capabilities.
3 | bot.dialog('sobot:menu', [
4 | async (session) => {
5 | let msg = attachments.buildMenuMessageWithAttachments(session);
6 | session.endDialog(msg);
7 | }
8 | ]).triggerAction({
9 | matches: 'Help'
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/dialogs/search.js:
--------------------------------------------------------------------------------
1 | module.exports = () => {
2 | // Perform a search and respond with results.
3 | bot.dialog('sobot:search', [
4 | async (session, args) => {
5 | session.sendTyping();
6 | let userText = session.message.text.toLowerCase();
7 | bingSearchQuery(session, { query: cleanQueryString(userText, false) });
8 | }
9 | ]).triggerAction({
10 | matches: ['Search', 'None']
11 | });
12 | }
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/lib/cognitiveservices.js:
--------------------------------------------------------------------------------
1 | var services = [{
2 | title: "Text Analytics API",
3 | description: "A cloud-based service that provides advanced NLP over raw text to detect sentiment, key phrases, and language.",
4 | url: "https://azure.microsoft.com/en-us/services/cognitive-services/text-analytics/"
5 | }, {
6 | title: "Bing Custom Search",
7 | description: "An easy-to-use, ad-free, commercial-grade search tool that lets you deliver the results you want.",
8 | url: "https://azure.microsoft.com/en-us/services/cognitive-services/bing-custom-search/"
9 | }, {
10 | title: "Computer Vision API",
11 | description: "Extract rich information from images to categorize and process visual data to help curate your services.",
12 | url: "https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/"
13 | }, {
14 | title: "LUIS",
15 | description: "Understand language contextually, so your app communicates with people in the way they speak.",
16 | url: "https://azure.microsoft.com/en-us/services/cognitive-services/language-understanding-intelligent-service/"
17 | }];
18 |
19 | module.exports = services;
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/lib/sentimentanalyzerclient.js:
--------------------------------------------------------------------------------
1 | const request = require('request-promise');
2 |
3 | function SentimentAnalyzerClient (opts) {
4 | if (!opts.key) throw new Error('Key is required.');
5 |
6 | this.key = opts.key;
7 | }
8 |
9 | SentimentAnalyzerClient.prototype.post = async (opts, cb) => {
10 | if (!opts.text) throw new Error('Text is required');
11 | cb = cb || (() => { });
12 |
13 | const url = `${process.env.TEXT_ANALYTICS_URL}/sentiment`;
14 |
15 | const content = {
16 | documents: [{
17 | language: "en",
18 | id: "1",
19 | text: opts.text.trim()
20 | }]
21 | };
22 |
23 | const options = {
24 | method: 'POST',
25 | uri: url,
26 | body: content,
27 | json: true,
28 | headers: {
29 | "Ocp-Apim-Subscription-Key": this.key,
30 | "Content-Type": "application/json"
31 | }
32 | };
33 |
34 | await request(options)
35 | .then((body) => {
36 | // POST succeeded
37 | return cb(null, body);
38 | })
39 | .catch((err) => {
40 | // POST failed
41 | return cb(err);
42 | });
43 | }
44 |
45 | module.exports = SentimentAnalyzerClient;
46 |
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "stackbot",
3 | "version": "1.0.0",
4 | "description": "A bot that helps you code. Built with Bot Framework and Microsoft Cognitive Services.",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "node index.js"
8 | },
9 | "author": "Microsoft Inc.",
10 | "license": "MIT",
11 | "dependencies": {
12 | "botbuilder": "^3.9.0",
13 | "devnull": "0.0.12",
14 | "lodash": "^4.17.10",
15 | "request": "^2.87.0",
16 | "request-promise": "^4.2.2",
17 | "restify": "^5.2.1"
18 | },
19 | "engines": {
20 | "node": "8.1.4"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackBot/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
28 |
29 |
30 |
31 |
32 |
42 |
43 |
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackCode/StackCode-0.1.1.vsix:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/BotFramework-BlogSamples/234f3fb2e445b8e7f77c0cfdfaab6e559c67d945/StackOverflow-Bot/StackCode/StackCode-0.1.1.vsix
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackCode/directline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/BotFramework-BlogSamples/234f3fb2e445b8e7f77c0cfdfaab6e559c67d945/StackOverflow-Bot/StackCode/directline.png
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackCode/out/test/extension.test.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | //
3 | // Note: This example test is leveraging the Mocha test framework.
4 | // Please refer to their documentation on https://mochajs.org/ for help.
5 | //
6 | Object.defineProperty(exports, "__esModule", { value: true });
7 | // The module 'assert' provides assertion methods from node
8 | const assert = require("assert");
9 | // Defines a Mocha test suite to group tests of similar kind together
10 | suite("Extension Tests", () => {
11 | // Defines a Mocha unit test
12 | test("Something 1", () => {
13 | assert.equal(-1, [1, 2, 3].indexOf(5));
14 | assert.equal(-1, [1, 2, 3].indexOf(0));
15 | });
16 | });
17 | //# sourceMappingURL=extension.test.js.map
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackCode/out/test/extension.test.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"extension.test.js","sourceRoot":"","sources":["../../test/extension.test.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,kEAAkE;AAClE,wEAAwE;AACxE,EAAE;;AAEF,2DAA2D;AAC3D,iCAAiC;AAOjC,qEAAqE;AACrE,KAAK,CAAC,iBAAiB,EAAE;IAErB,4BAA4B;IAC5B,IAAI,CAAC,aAAa,EAAE;QAChB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackCode/out/test/index.js:
--------------------------------------------------------------------------------
1 | //
2 | // PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
3 | //
4 | // This file is providing the test runner to use when running extension tests.
5 | // By default the test runner in use is Mocha based.
6 | //
7 | // You can provide your own test runner if you want to override it by exporting
8 | // a function run(testRoot: string, clb: (error:Error) => void) that the extension
9 | // host can call to run the tests. The test runner is expected to use console.log
10 | // to report the results back to the caller. When the tests are finished, return
11 | // a possible error to the callback or null if none.
12 | var testRunner = require('vscode/lib/testrunner');
13 | // You can directly control Mocha options by uncommenting the following lines
14 | // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
15 | testRunner.configure({
16 | ui: 'tdd',
17 | useColors: true // colored output from test results
18 | });
19 | module.exports = testRunner;
20 | //# sourceMappingURL=index.js.map
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackCode/out/test/index.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../test/index.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,mEAAmE;AACnE,EAAE;AACF,8EAA8E;AAC9E,oDAAoD;AACpD,EAAE;AACF,+EAA+E;AAC/E,kFAAkF;AAClF,iFAAiF;AACjF,gFAAgF;AAChF,oDAAoD;AAEpD,IAAI,UAAU,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAElD,6EAA6E;AAC7E,mGAAmG;AACnG,UAAU,CAAC,SAAS,CAAC;IACjB,EAAE,EAAE,KAAK;IACT,SAAS,EAAE,IAAI,CAAC,mCAAmC;CACtD,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC"}
--------------------------------------------------------------------------------
/StackOverflow-Bot/StackCode/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es6",
5 | "outDir": "out",
6 | "lib": [
7 | "es6"
8 | ],
9 | "sourceMap": true,
10 | "rootDir": "."
11 | },
12 | "exclude": [
13 | "node_modules",
14 | ".vscode-test"
15 | ]
16 | }
--------------------------------------------------------------------------------
/StackOverflow-Bot/env.template:
--------------------------------------------------------------------------------
1 | export BOTBUILDER_APP_ID=
2 | export BOTBUILDER_APP_PASSWORD=
3 | export KB_ID=
4 | export QNA_KEY=
5 | export QNA_URL=
6 | export LUIS_MODEL=
7 | export DIALOG_ANALYZER_CLIENTID=
8 | export DIALOG_ANALYZER_KEY=
9 | export DIALOG_ANALYZER_URL=
10 | export BING_SEARCH_CONFIG=
11 | export BING_SEARCH_KEY=
12 | export TEXT_ANALYTICS_KEY=
13 | export TEXT_ANALYTICS_URL=
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26430.6
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Bot.Sample.AzureSql", "Microsoft.Bot.Sample.AzureSql\Microsoft.Bot.Sample.AzureSql.csproj", "{18C42588-D8F0-48A9-A7AF-02A5BF8252A9}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {18C42588-D8F0-48A9-A7AF-02A5BF8252A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {18C42588-D8F0-48A9-A7AF-02A5BF8252A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {18C42588-D8F0-48A9-A7AF-02A5BF8252A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {18C42588-D8F0-48A9-A7AF-02A5BF8252A9}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Microsoft.Bot.Sample.AzureSql.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using Microsoft.Bot.Builder.Dialogs;
3 | using Microsoft.Bot.Builder.Dialogs.Internals;
4 | using Microsoft.Bot.Connector;
5 | using Microsoft.Bot.Sample.AzureSql.SqlStateService;
6 | using System.Web.Http;
7 |
8 | namespace Microsoft.Bot.Sample.AzureSql
9 | {
10 | public class WebApiApplication : System.Web.HttpApplication
11 | {
12 | protected void Application_Start()
13 | {
14 | GlobalConfiguration.Configure(WebApiConfig.Register);
15 |
16 | var builder = new ContainerBuilder();
17 |
18 | builder.RegisterModule(new DialogModule());
19 |
20 | var store = new SqlBotDataStore("BotDataContextConnectionString");
21 |
22 | builder.Register(c => new CachingBotDataStore(store, CachingBotDataStoreConsistencyPolicy.LastWriteWins))
23 | .As>()
24 | .AsSelf()
25 | .InstancePerLifetimeScope();
26 |
27 | builder.Update(Conversation.Container);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Migrations/201707121827490_Initial Setup.Designer.cs:
--------------------------------------------------------------------------------
1 | //
2 | namespace Microsoft.Bot.Sample.AzureSql.Migrations
3 | {
4 | using System.CodeDom.Compiler;
5 | using System.Data.Entity.Migrations;
6 | using System.Data.Entity.Migrations.Infrastructure;
7 | using System.Resources;
8 |
9 | [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
10 | public sealed partial class InitialSetup : IMigrationMetadata
11 | {
12 | private readonly ResourceManager Resources = new ResourceManager(typeof(InitialSetup));
13 |
14 | string IMigrationMetadata.Id
15 | {
16 | get { return "201707121827490_Initial Setup"; }
17 | }
18 |
19 | string IMigrationMetadata.Source
20 | {
21 | get { return null; }
22 | }
23 |
24 | string IMigrationMetadata.Target
25 | {
26 | get { return Resources.GetString("Target"); }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Migrations/Configuration.cs:
--------------------------------------------------------------------------------
1 | namespace Microsoft.Bot.Sample.AzureSql.Migrations
2 | {
3 | using System;
4 | using System.Data.Entity;
5 | using System.Data.Entity.Migrations;
6 | using System.Linq;
7 |
8 | internal sealed class Configuration : DbMigrationsConfiguration
9 | {
10 | public Configuration()
11 | {
12 | AutomaticMigrationsEnabled = false;
13 | }
14 |
15 | protected override void Seed(Microsoft.Bot.Sample.AzureSql.SqlStateService.SqlBotDataContext context)
16 | {
17 | // This method will be called after migrating to the latest version.
18 |
19 | // You can use the DbSet.AddOrUpdate() helper extension method
20 | // to avoid creating duplicate seed data. E.g.
21 | //
22 | // context.People.AddOrUpdate(
23 | // p => p.FullName,
24 | // new Person { FullName = "Andrew Peters" },
25 | // new Person { FullName = "Brice Lambson" },
26 | // new Person { FullName = "Rowan Miller" }
27 | // );
28 | //
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/SqlStateService/SqlBotDataContext.cs:
--------------------------------------------------------------------------------
1 | using System.Data.Entity;
2 |
3 |
4 | namespace Microsoft.Bot.Sample.AzureSql.SqlStateService
5 | {
6 | public class SqlBotDataContext : DbContext
7 | {
8 | public SqlBotDataContext()
9 | : this("BotDataContextConnectionString")
10 | {
11 | }
12 | public SqlBotDataContext(string connectionStringName)
13 | : base(connectionStringName)
14 | {
15 | }
16 | public DbSet BotData { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/default.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/Microsoft.Bot.Sample.AzureSql/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/AzureSql-StateClient/README.md:
--------------------------------------------------------------------------------
1 | # Explanation
2 |
3 | A example State Client using Sql Server for storage.
4 |
5 | # Setup
6 |
7 | 1) Register a bot with the Bot Framework at http://dev.botframework.com/ and add the AppId and AppPassword to Microsoft.Bot.Sample.AzureSql\Web.config.
8 |
9 | 2) Retrieve a WebChat secret from https://dev.botframework.com/bots/channels?id=[YourBotId]&channelId=webchat and add it to Microsoft.Bot.Sample.AzureSql\default.htm in place of [YourWebChatSecret].
10 |
11 | 3) Create an Sql Server database and add the connection string to Microsoft.Bot.Sample.AzureSql\Web.config, overwriting the current [BotDataContextConnectionString].
12 |
13 | 4) Execute 'update-database' from the Nuget Package Manager Console. This will create the SqlBotDataEntities table.
14 |
15 | 5) Publish the Bot as an Azure App Service, and add the public endpoint (https://[YourHostUrl]/api/messages) to the Bot Framework portal settings page. Make sure to use https instead of http in the url.
16 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26730.15
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot-Feedback-Sample", "Bot-Feedback-Sample\Bot-Feedback-Sample.csproj", "{A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {A8BA1066-5695-4D71-ABB4-65E5A5E0C3D4}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {F417B28C-F273-42B3-8A2F-01C59DCEB6B6}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/Connected Services/Application Insights/ConnectedService.json:
--------------------------------------------------------------------------------
1 | {
2 | "ProviderId": "Microsoft.ApplicationInsights.ConnectedService.ConnectedServiceProvider",
3 | "Version": "8.8.712.1",
4 | "GettingStartedDocument": {
5 | "Uri": ""
6 | }
7 | }
--------------------------------------------------------------------------------
/blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Bot_Feedback_Sample.WebApiApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/Global.asax.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 | using System.Web.Http;
6 | using System.Web.Routing;
7 |
8 | namespace Bot_Feedback_Sample
9 | {
10 | public class WebApiApplication : System.Web.HttpApplication
11 | {
12 | protected void Application_Start()
13 | {
14 | GlobalConfiguration.Configure(WebApiConfig.Register);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/Bot-Feedback-Sample/Bot-Feedback-Sample/default.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Bot_Feedback_Sample
9 | Describe your bot here and your terms of use etc.
10 | Visit Bot Framework to register your bot. When you register it, remember to set your bot's endpoint to
https://your_bots_hostname/api/messages
11 |
12 |
13 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/BotStateExport/BotStateExport/BotStateExport.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27130.2027
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BotStateExport", "BotStateExport\BotStateExport.csproj", "{DA593586-7A94-43D4-8EF1-0474EFF6D2E0}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {DA593586-7A94-43D4-8EF1-0474EFF6D2E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {DA593586-7A94-43D4-8EF1-0474EFF6D2E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {DA593586-7A94-43D4-8EF1-0474EFF6D2E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {DA593586-7A94-43D4-8EF1-0474EFF6D2E0}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {2F9065FE-E24D-4377-AD1D-631E08ED7E57}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/BotStateExport/BotStateExport/BotStateExport/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/BotStateExport/BotStateExport/BotStateExport/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Microsoft.Bot.Builder.Azure
4 | {
5 | internal static class StringExtensions
6 | {
7 | private static readonly Dictionary _DefaultReplacementsForCharactersDisallowedByAzure = new Dictionary() { { "/", "|s|" }, { @"\", "|b|" }, { "#", "|h|" }, { "?", "|q|" } };
8 |
9 | internal static string SanitizeForAzureKeys(this string input, Dictionary replacements = null)
10 | {
11 | var repmap = replacements ?? _DefaultReplacementsForCharactersDisallowedByAzure;
12 | return input.Trim().Replace("/", repmap["/"]).Replace(@"\", repmap[@"\"]).Replace("#", repmap["#"]).Replace("?", repmap["?"]);
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/blog-samples/CSharp/BotStateExport/README.md:
--------------------------------------------------------------------------------
1 | This is some rough code for exporting an Azure Bot Service bot's bot state data. This version just dumps it to the console.
--------------------------------------------------------------------------------
/blog-samples/CSharp/Custom-State-BotBuilder-Azure-Sample/Azure-DocumentDB-Custom-State/Dialogs/RootDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Microsoft.Bot.Builder.Dialogs;
4 | using Microsoft.Bot.Connector;
5 |
6 | namespace Azure_Blob_Custom_State.Dialogs
7 | {
8 | [Serializable]
9 | public class RootDialog : IDialog