https://github.com/madahetooo/weather-bot
this is weather-bot using Microsoft Bot Framework v4
https://github.com/madahetooo/weather-bot
azure azure-bot-service bot bot-framework bot-framework-emulator chatbot microsoft-bot-framework microsoft-cognitive-services
Last synced: 9 months ago
JSON representation
this is weather-bot using Microsoft Bot Framework v4
- Host: GitHub
- URL: https://github.com/madahetooo/weather-bot
- Owner: madahetooo
- Created: 2021-05-25T22:36:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-29T10:09:55.000Z (almost 5 years ago)
- Last Synced: 2025-03-05T11:19:16.335Z (about 1 year ago)
- Topics: azure, azure-bot-service, bot, bot-framework, bot-framework-emulator, chatbot, microsoft-bot-framework, microsoft-cognitive-services
- Language: JavaScript
- Homepage:
- Size: 11.8 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# netways-weather-bot-task
### Describtion
This is a chatbot for getting the weather degree.
This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to create a simple bot that accepts input from the user and echoes it back.
Firstly, I started searching for what is the Microsoft Bot Framework and how to use it, Then downloaded the Prerequisites to be able to start working on the task.
## Prerequisites
- [ASP.NET Core Runtime 3.1](https://dotnet.microsoft.com/download)
- [Microsoft Visual Studio 2019 for Mac.](https://visualstudio.microsoft.com/vs/mac/)
- [Microsoft Bot Emulator.](https://github.com/microsoft/BotFramework-Emulator/blob/master/README.md)
- [Bot Framework v4 SDK Templates for Visual Studio](https://marketplace.visualstudio.com/items?itemName=BotBuilder.botbuilderv4)
- [Node.js](https://nodejs.org) version 10.14.1 or higher
```bash
# determine node version
node --version
```
## To run the bot i faced some troubles because of my mac:
- After downloading the VS and the botBuilder VSIXV4.vsix file, i couldn't install it because this extention not supported on macOS.
- So i downloaded a sample code locally to open it with VS to test and try the emulator and it works fine, but still cannot see the " Create Echo Bot" template from the starting new project panel, to be able to start from scartch as shown below.


- So I switched the work from C# to JavaScript to be able to create the project from the scartch and save time for the task delivery.
- So,I started with installing the Yeoman generator for Bot Framework v4. It Will let me quickly set up a conversational AI bot using core AI capabilities.
```bash
npm install -g yo
```
```bash
npm install -g generator-botbuilder
```
- Choose "Echo Bot " Template and used the core bot features " Send and Receive Messages".
- Create a New Project
```bash
yo botbuilder
```
- Install modules
```bash
npm install
```
- Start the bot
```bash
npm start
```
### And Here we go!

### Connect to the bot using Bot Framework Emulator
- Launch Bot Framework Emulator
- Enter a Bot URL of `http://localhost:3978/api/messages`
- Then i followed the task requirements turns, until here and the bot works locally fine.

## Deploy the bot to Azure
when it come to deploying a bot to Azure, i used this docs [Deploy your bot to Azure](https://aka.ms/azuredeployment) for a complete the list of deployment instructions.
I started with pushing the project to Github without the node_modules by adding it to the .gitignore file.
- First I make a subscription to Microsoft Azure.
- Downloaded the latest version of Azure CLI.
But while following the instructions, I faced this error while deploying:

After doing a research on this [issue](https://github.com/Azure/azure-quickstart-templates/issues/7302), i followed a tutorial to solve it manually by adding:
- Azure Extension on VSC and connect it with Github repo.
- Join Microsoft Azure dashboard.
- Create a Resource Group for the bot.
- Create an App service plan.
- Create a New Bot Web APP.

- Also made an Azure Pipeline.

- And its Done.

- From the "Channel" Integration end point, I choosed WEB APP, and added the iframe to my personal website for example.

## You can test it through this url:
[BotWebApp](https://www.eslammedhat.me/home)
## I used Luis.ai

## I Also worked with QnA Maker

And tested it and works as expected

## Then i published the QnA Maker and added the configuration to the .env file to hit the Knowloedge base


## When it comes the enhancing the front end, i followed this tutorial
- [Change chat bubble font and color](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-webchat-customization?view=azure-bot-service-4.0)

## References i used
- [Bot Framework Documentation](https://docs.botframework.com)
- [Bot Basics](https://docs.microsoft.com/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0)
- [Azure Bot Service Introduction](https://docs.microsoft.com/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)
- [Azure Bot Service Documentation](https://docs.microsoft.com/azure/bot-service/?view=azure-bot-service-4.0)
- [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest)
- [Azure Portal](https://portal.azure.com)
- [Channels and Bot Connector Service](https://docs.microsoft.com/en-us/azure/bot-service/bot-concepts?view=azure-bot-service-4.0)
- [Restify](https://www.npmjs.com/package/restify)