Quick and dirty simple bot created with dialogflow.
The bot gives information about countries (capital, population, currency, region and languages), and about the weather. We can ask the but things like:
- What is the capital of Brazil?
or
- Whats the weather forecast for Berlin tomorrow?
Try with yourself with this Web demo
The following picture summarizes the bot application architecture:
- The bot was created with Dialogflow (api.ai).
- Given a user input, dialogflow identifies which action should be performed and the values of the parameters required to perform that action.
- Ex.: User says: "What's is the capital of France?". In this case, the action to be performed is "search country capital", which requires parameter "country". The value of country is "France" in this example.
- The action is fulfilled by a web service.
- The Web Fulfillment Service is a Flask Application, which was implemented as a single file (app.py).
- This aplication calls a RESTful API (rest-countries) to get information about countries, and the Yahoo Weather API to get weather information.
- The application was deployed to Heroku.