Skip to main content

Complete On-Premise and Fully Customisable Chat Bot - Part 1 - Overview

Hey Folks !! Welcome back!

For long time I was searching for the solution to make a in-house chatbot that operates with in the organisation and no compromise on the data security using the NLP cloud services or the Bot agents.

Luckily I got to know about the combination of the BOTKIT and the RASA NLU can make this solution. I went on searching and searching for the solution for the long time and I could find the pieces here and there and completed the solution.

I write this to help other folks to make this solution easier rather than searching a lot.


The solution goes on as follows.


Components are as follows :

  1. Front-End UI
  2. Botkit server / Agent server
  3. RASA NLU server 
  4. Business Logic Server
  5. DataSource 
  6. External Api if any
Now seeing in detail what these components will do.

Front-end UI :

This is the component where the user interacts with. This can be on any technology like the Angular webapp or android app ...etc

Borkit Server / Agent Server:

This is the place where the actual botkit server lies. Agent is made using the Botkit and it receives the user meassage.

RASA - NLU:

RASA NLU server is the natural language processor. It acts as the middle ware for the Botkit and helps in parsing and classify the natural language of the user to the Intents and Entities which in-turn becomes the input for the Business logic server to respond back with the respective message back to the user.

Business Logic Server:

Business logic server can be on any server technology like PHP, spring boot, Node js etc. We follow the Node js here in this blog. This server will receive the intents as the input and the response will be formed by this server based on the business logic. This also uses the database and the external API to form the response.

Any one to build this solution the following technology stack is needed.
  1. Python basics like PIP installer and command execution knowledge to run the RASA NLU.
  2. Knowledge in JSON and Websocket protocol
  3. Node js 
  4. Any front end technology. (Here we rely on Angular)
  5. Prior knowledge or work experience in chat bot is plus point
Believe me this blog is going to be as simple that the beginner can even can build the Chat bot from scratch that runs within the premise and no dependency on the cloud services.

We will start with building our Agent using the BOTKIT framework. 

Comments

Popular posts from this blog

How to access the each view of item by position in Recycler View in android ?

How to access the each view of item by position in Recycler View in android ? There are some methods to access the view of each item view to change or update the view during the run time. To access the view of the item view , consider the Recycler view as below, RecyclerView mainRecyclerView = (RecyclerView)view.findViewById(R.id.main_recycler_view); RecyclerAdapter adapter = new RecyclerAdapter(mContext); mainRecyclerView.setAdapter(adapter); main.setLayoutManager(new LinearLayoutManager(mContext));  To access the itemView of each position the following functions can be used,  1. View itemView = mainRecyclerView.getChildAt(positionOfItem);  2. View itemView = mainRecyclerView.findViewHolderForAdapterPosition(Position).itemView;  3. View itemView = mainRecyclerView.findViewHolderForPosition(Position).itemView;  4. Long itemId = mainRecyclerView.getAdapter().getItemId(position);       View itemView = mainRecyclerView....

How Machine Learning Works ? - Data Rules the Kingdom

W elcome Back Readers !, For those who have not read the previous post on How Machine Learning works ? Please do read previous one before continuing this so that it would be more easy to understand. You can find the previous post here How Machine Learning Works ? - Mathematics Every Where . For other who are ready to join with me in this journey to understand the Machine Learning, Thank you for being with this post. Till now we are discussing on the the title "How Machine Learning works? " and to understand that we have seen in the first post that there exist the patterns or trends in the data and we try to find that in terms of a mathematical equation called a model and try to fit to the new data that we have not came across for predicting the values. Wow may be we got the entire process complete with this. But there are few thinks that needs to be cared while training the model or creating the model or while processing the data for the model creation. ...

A.P.I call or async await not working in Array forEach ?

H ello Readers, Welcome back. You would have wondered why does forEach function on the array does not wait for any asynchronous function even if we provide the async await in the node js. If you are the person, wondered about this ever, this post is right for you. Non working example : Lets consider the below snippet, this will not wait for the asynchronous process to wait. I am making a setTimeout to mock the API call async process. This will result the count as, Output : count = 0 OMG !! Why it doesn't work ? Answer probably might be lying inside the Array prototype from JavaScript. Lets take a look inside the "Array.prototype.forEach" function. From the snippet its clear that, the for loop in which they call the callback function does not wait for the asynchronous process to run in the callback. So this forEach is not build for asynchronous process itself. So can't I use forEach any more for running a asynchronous function ? Answer g...