Bot Framework v4 echo bot sample.
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.
- Clone the repository
git clone https://github.com/Microsoft/botbuilder-samples.git
- In a terminal, navigate to
botbuilder-samples\samples\python\02.echo-bot
folder - Activate your desired virtual environment
- In the terminal, type
pip install -r requirements.txt
- Run your bot with
python app.py
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 latest Bot Framework Emulator from here
- Launch Bot Framework Emulator
- File -> Open Bot
- Enter a Bot URL of
http://localhost:3978/api/messages
Enter text in the emulator. The text will be echoed back by the bot.
To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.
- Bot Framework Documentation
- Bot Basics
- Activity processing
- Azure Bot Service Introduction
- Azure Bot Service Documentation
- Azure CLI
- Azure Portal
- Channels and Bot Connector Service
python3 -m venv venv
source venv/bin/activate
venv/bin/pip3 install -r requirements.txt
pip3 install botbuilder-core
pip3 install aiohttp
pip3 install cookiecutter==1.7.0
The packages will be installed on venv/lib/python3.9/site-packages/
- From your working directory, run the following command to download the echo bot template and its dependencies:
cookiecutter https://github.com/microsoft/BotBuilder-Samples/releases/download/Templates/echo.zip
- You'll be prompted to give your bot a name and description. Enter the following values:
- bot_name: echo_bot
- bot_description: A bot that echoes back user response.
Install ngrok via Homebrew
brew install ngrok/ngrok/ngrok
That's almost a mystery, cause Microsoft documentation about this SUCKS!
1. go to your Azure bot Configuration (the same place where you have the field "Messaging endpoint")
2. Next to the label for the field "Microsoft App ID (Manage)", click on the hyperlink "Manage"
3. Click on the section "Certificate & Secrets"
4. Go to the tab "Client Secrets"
5. Generate a "New client secret", copy the "Value" column