Skip to content

Latest commit

 

History

History

README.md

BotBuilderRecognizerBot

This sample demonstrates how the Recognizers can be used with a BotBuilder Bot to parse user input. The bot provides a basic experience for ordering roses, it starts by asking the amount of roses and then asks for a delivery date and time. This bot has been created using Bot Framework, it shows how to:

  • Implement a multi-turn conversation using Dialogs
  • Prompt for and validate requests for information from the user

This sample requires prerequisites in order to run.

To try this sample

  • In a terminal, navigate to <your_project_folder>/BotBuilder

    # change into project folder
    cd <your_project_folder>/BotBuilder
  • Run the bot from a terminal or from Visual Studio, choose option A or B.

    A) From a terminal

     # run the bot
     dotnet run

    B) Or from Visual Studio

    • Launch Visual Studio
    • File -> Open -> Project/Solution
    • Navigate to <your_project_folder>/BotBuilder folder
    • Select BotBuilderRecognizerBot.csproj file
    • Press F5 to run the project

Testing the bot using Bot Framework Emulator v4

Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.

  • Install the Bot Framework Emulator version 4.2.0 or greater from here

Connect to the bot using Bot Framework Emulator v4

  • Launch Bot Framework Emulator
  • File -> Open Bot Configuration
  • Navigate to <your_project_folder>/BotBuilder folder
  • Select BotBuilderRecognizerBot.bot file

Deploy the bot to Azure

Prerequisites

Provision a Bot with Azure Bot Service

After creating the bot and testing it locally, you can deploy it to Azure to make it accessible from anywhere. To deploy your bot to Azure:

# login to Azure
az login
# set you Azure subscription
az account set --subscription "<azure-subscription>"
# provision Azure Bot Services resources to host your bot
msbot clone services --name "BotBuilder" --code-dir "." --location westus --sdkLanguage "Csharp" --folder deploymentScripts/msbotClone --verbose

Publishing Changes to Azure Bot Service

As you make changes to your bot running locally, and want to deploy those change to Azure Bot Service, you can publish those change using either publish.cmd if you are on Windows or ./publish if you are on a non-Windows platform. The following is an example of publishing

# run the publish helper (non-Windows) to update Azure Bot Service.  Use publish.cmd if running on Windows
./publish

Getting Additional Help Deploying to Azure

To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.

Further reading