Dialogflow (formerly api.ai) is kind of a framework from Google which is used to interact with your product by building engaging voice and text-based conversational interfaces powered by AI.
Here are the simple steps to build a weatherbot which will fetch the realtime weather from Yahoo. Dialogflow interacts with Yahoo Weather by means of an Python API deployed in Heroku (with GitHub).
- Open https://dialogflow.com/ and click sign up.
- Sign in with your Google Account.
- Once logged in, click on create Agent
4. Enter the name of the bot and click save
5. Goto Intents and click Create Intent
6. Enter the intent name as weather-intent and enter the text under “User says” as required. This will be text which would be considered as input or recognized from your speech. Enter "yahooWeatherForecast" under action name (This is the action name in our python code available in Github). Click “Save”
7. Goto https://github.com/rameshjothimani/fulfillment-webhook-weather-python
and click deploy to heroku
8. If you don’t have an account
in heroku, you will be asked to Signup
9. After Signup, you will be
asked for Appname and choose region.
10. Enter a Appname and click “Deploy App”
11. Enter https://weatherbotdemo.herokuapp.com/webhook
in the browser, you should get as “Method Not Allowed” if the app is
successfully deployed. We will get this error since GET is not allowed.
12. Enter the webhook URL under fulfillment in Dialogflow and click Save.
12. Enter the webhook URL under fulfillment in Dialogflow and click Save.
13. Click on Intents in Dialogflow
and select “Use webhook” under fulfillment. Click Save.
14. Enter the text in try it now as "how is weather in location_name ?"