Demonstrate the core capabilities of the Microsoft Bot Framework
This bot has been created using Bot Framework, it shows how to create a simple bot that accepts input from the user and echoes it back.
There are multiple ways of making your bot session data persistent.
Choose your storage strategy according to the storage factory.
-
Option 1: Memory, no need to create resources
-
Option 2: Cosmos DB:
group='rg-bot'
location='eastus2'
cosmosAccount='cosmos-botframework-999'
cosmosDatabase='greetingbot'
az group create -n $group -l $location
az cosmosdb create -n $cosmosAccount -g $group
az cosmosdb sql database create -a $cosmosAccount -g $group -n $cosmosDatabase
az cosmosdb sql container create \
-a $cosmosAccount \
-g $group \
-d $cosmosDatabase \
-n 'messages' \
--partition-key-path '/messages'
- Option 3: Storage Account:
group='rg-bot'
location='eastus2'
storage='stbotfrmk999'
az group create -n $group -l $location
az storage account create \
-n $storage \
-g $group \
-l $location \
--kind StorageV2 \
--sku Standard_LRS
# get the connection string and use it here
az storage container create -n 'messages' --connection-string '<CONNECTION_STRING>'
# "yo" and "generator-botbuilder"
yarn global add yo generator-botbuilder
yarn install
yarn start
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 latest version from here
- Launch Bot Framework Emulator
- File -> Open Bot
- Enter a Bot URL of
http://localhost:3978/api/messages
To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.