This github repository consists of fulfillment code that has been written for Dialogflow using Python. Here are the pre-requisites to perform fulfillment using Python for Dialogflow using the given code:
- Create an account on Dialogflow
- Create a new agent(name it something on the lines of TripPlanner) on Dialogflow and under settings, import the TripPlanner.zip - this will import all the entities and intents into the newly created agent
- Install Ngrok on your system (follow the instructions given on the ngrok website to install your ngrok key as well). Here is the ngrok link to get started: https://dashboard.ngrok.com/get-started
- Install Python on your system and install Flask for Python
- Run the given Python file
- Go to the folder where you have installed ngrok and perform: ./ngrok http 5000. Take the https://... URL generated by ngrok
- In your Dialogflow agent, go to fulfillment and Enable the Webhook(Option 1). Paste the above ngrok URL/webhooksample in the given space for URL
- You can now save and run the dialogflow agent and you will see a response from the python code that you have written :)!