Now that Dialogflow setup is complete which will act as your NLP, it is time to write your Django application which will act as a webook from dialogflow.
It is super simple to create your first Hello World! app, visit and try creating a sample app https://www.djangoproject.com/, once you get familiar with Djangoyou are ready to go, below is an example of view I created in Django application which will provide webservice.
This screenshot is from my views.py file in Django Application. Below code is basically a providing a webhook/fulfillment response to Dialogflow NLP (Refer to part 1 step 7)
Once you write your django app, you will need to run it on your local webserver port 8000 using following command from command prompt...python manage.py runserver, your app should run now with out errors
Now its time to use NGROK to expose your webserver to internet, use this only for development for production you need to create a secure webserver
ngrok http yourport will expose your local webserver to internet
Copy forwarding https url and paste it in your dialogflow application, your Django application is now ready to receive web-service requests.
Since we are using Django now as a webhook not PeopelSoft rest service, sky is the limit to integrate your chatbot to any third party applications to fulfill user chat requests
In part 3 I will show a working prototype of Kommunicate chat
It is super simple to create your first Hello World! app, visit and try creating a sample app https://www.djangoproject.com/, once you get familiar with Djangoyou are ready to go, below is an example of view I created in Django application which will provide webservice.
This screenshot is from my views.py file in Django Application. Below code is basically a providing a webhook/fulfillment response to Dialogflow NLP (Refer to part 1 step 7)
Once you write your django app, you will need to run it on your local webserver port 8000 using following command from command prompt...python manage.py runserver, your app should run now with out errors
Now its time to use NGROK to expose your webserver to internet, use this only for development for production you need to create a secure webserver
ngrok http yourport will expose your local webserver to internet
Copy forwarding https url and paste it in your dialogflow application, your Django application is now ready to receive web-service requests.
Since we are using Django now as a webhook not PeopelSoft rest service, sky is the limit to integrate your chatbot to any third party applications to fulfill user chat requests
In part 3 I will show a working prototype of Kommunicate chat
Wow! Eagerly waiting to see your prototype.
ReplyDeleteSure, will post in March 1st week
DeleteThank you for sharing your blog, seems to be useful information can’t wait to dig deep!
ReplyDelete