- Java jdk 1.8
- Spring boot suite 4.8.1
- Angular 10+ node.js
- Visual Studio code IDE. Vs 1.51
Chatbots, or conversational interfaces present a new way for individuals to interact with computer systems. A chatbot allows a user to simply ask questions in the same manner that they would address a human.
We have developed a personal assistant which will make the life easier for the user just by listening to the command. Since it is a personal chatbot it can hold the credential and it also maintain the session. The user can ask for any information*(Ex: Server, API, application status, deployment status)* if authenticated otherwise need to authenticate first by providing their credentials. Apart from this some of the automation work can also be implemented in future such as scaling of the server(explained in the future extension section).
A RAML crawler is used for generation of patterns and it is built on top of Mule-RAML API. The generated pattern is used to generate a base AIML template.
Currently, this chatbot is build on top of the Program AB(AIML based chatbot) which is internally calling cloud hub API. The JSON data which is coming from the cloud hub API is parsed into the map in such a way that the hierarchy is break down i.e. all the keys are brought to the root level which will optimizes the search. The whole functionality is wrapped up in the response handler API.
This hash map is used to fill Mother AIML file template and later it is loaded to the Bot at run time and the bot will give the best response from the available option. Which will be later shown to the end user at the chatbot UI.
Download the Zip file and extract.
- Once all the packages are installed through npm install.
- Run the command ng serve, which builds and runs the app. Here, the app runs on port 4200 by default .
- If you want to use a different port (eg : 4202)
- Run the command ng serve--port 4202 instead of ng serve.
Open Visual Studio Code.
To open an existing app folder
Go to File --> Open Folder --> open the extracted app folder
- Chatbox component
- App component
- Chatbox Service module
ng generate component componentname
ng g c componentname
npm install packagename@version
ng g service servicename
It contains all the components, modules and services created and used in the UI app
using npm install command
Download the project Zip file. click here
Extract the zip file to the spring boot suite(STS) workspace.
Open the extracted file, Go to
File->open project from the file system
Search for the directory where you have extracted your project and then click finish. It will add your project to the workspace.
Clean your project
Project->Right click->Debug as->maven clean->finish
Update your project.(it will add all your dependency)
Project ->right click->maven-> update project->force update
write port number and the cloudHub API in the application.properties file as shown below and save the file.
Go to chatbot.java file:
add @CrossOrigin(origins = http://localhost:4202).(We are using port 4202. You can use any port number change the port accordingly.)
Open Chatbox.service.ts, Got to
Change the rest api url according to the port you are using as shown below.
Once your set up is ready.
Start your backend service as spring boot app. Go to
project->right click->run as->spring boot app.
Put the URL http://localhost:4202 in the browser to see the running chatbot UI
We have tested our application for the following cloudhub Api:
For reference to other cloud hub API
Enter your query in the chatbot. For cloud hub related query, login to cloud hub.
Once Authentication successful. You will get the response.
Now, chatbot can also response to the cloud hub related query
- Interaction over Voice.
- Command following chatbot
Interaction over Voice:
We are trying to provide the voice capability to our chatbot such that the user can interact over voice.
Command following chatbot:
We are also working on providing the capability to our IGenie-ChattyBot to handle the minor error on our cloud where user intervention is not required.
The above statement can be justified by the below scenario:
Based on the error alert IGenie-ChattyBot will provide the best solutions to be tried, which can resolve the error or capable of handling by itself if required permission and formatted file given.