A Bot that bargains for the price of drinks with customers.
The Bargaining Bot was my final year engineering project. The front end is an Android App and the back end consists of the Natural Language Processing (NLP) platform - Dialogflow, a machine learning Tensorflow model, and couple of Cloud Functions, along with some Google Cloud Platform (GCP) services to make all the different elements work together. Login and Database is handled by Firebase.
- Android:
- Developing a reactive android app with the Model-View-ViewModel (MVVM) architecture pattern.
- Using dependency injection with kodein.
- Using the observable patterns with LiveData and ViewModel.
- Using Sq-lite local database with the Room Persistence Library
- Tensorflow:
- Building a basic Linear Regression model.
- Serving the model on GCP ML Engine.
- Cloud Functions:
- Building a serverless single purpose function with TypeScript.
- Working with JSON.
- Firebase:
- Implementing Google and Facebook login in android with Firebase Authentication.
- Using & modelling a No-SQL database with Cloud Firestore.
If you want to try it out you will need a Dialogflow account, a Google Cloud Platform (GCP) account, and a Firebase account. Firebase and Dialogflow both work on GCP itself so make sure Firebase, Dialogflow and GCP are all working on the same project.
-
Use this dialogflow template. It has all the necessary intents, actions and parameters setup. You can upload this zip to dialogflow and then customize it to your liking.
-
Next setup the webhook on Firebase Cloud Functions. Add the url of the function to the dialogflow webhook section.
-
Build your Tensorflow Model and upload the exported file to Cloud ML Engine on GCP. You will need to link to this model in the weebhook.
-
Create the Cloud Firestore database on Firebase and setup as shown in the images : 1, 2. The collections that are not explored in the images are blank collections for now that will be filled by the android app.
-
Next create a Cloud Pub/Sub topic on GCP. Add your topic name to the code in the next step.
-
Create another cloud function in similar way to the previous one from this repo.
-
Clone the Android App and follow the mentioned steps to link it to the firebase project.