Here we’ll tell you and demonstrate how to independently create and configure a chatbot of your own on the basis of Botlibre.
So, let’s start with the process of creation
1. Chatbot creation
To create a chatbot it is necessary to sign up to the site https://www.botlibre.com/, and sign in.
Click «Create», this window will appear:
Type the bot’s name in “Bot name”.
Then choose «Template» from an empty, basic, smart or some other chatbot. Describe the bot in the «Description» field.
Choose a category from the categories, click “Create” and get a chatbot of your own.
Now, let’s proceed to the process of bot training.
The process of bot training is not very complicated.
It is possible to train a bot either with the help of an interactive window, when you ask a question and write down an answer or correct a chatbot’s answer, or with the help of the markup language AIML.
Here is a template example:
templatesraistar/ /sraiHi /template
pattern Hi */pattern
templateHi sraistar/ /srai/template
pattern * Hi */pattern
template sraistar index="0" //srai Hisraistar index="1" //srai/template
This is a scrip example in aiml.
The chatbot singles out the word “Hi” and responds “Hi”. If there are more words, it sends them to itself as a remaining message for further analysis according to templates or for any other action.
Let’s see what kind of actions they are.
Because we use a programming language (self) on the basis of JS, we can work with strings.
var str=http.requestHTML("https://www.google.ru/search?q=site::http://endurancerobots.com/+" + star,hint='//*/h3/a/@href');
This is an example of the unprocessed url. return.
Using Google, it is also possible to correct spelling (it’s important since most people misspell words, while there are no errors in templates). It’s done by means of word analysis through http message.
Request delegation to another chatbot in case when the first chatbot knows that the other one is built to it (self).
var message = new Object();
message.message = res;
message.root = "chat";
message.@instance = ".......";
message.@application = "..........";
var result = Http.postXML("https://www.botlibre.biz/rest/api/chat", message);
This is what it looks like in case of aiml
patternask * about */pattern
templatestar/ says "sraix default="Timeout or max anonymous API calls exceeded"botnamestar//botnamestar index="2"//sraix"/template
In aiml there is tag learnf. Tag (learnf) enables to create templates in the automatic mode.
patternlearn question * answer */pattern
It creates a separate file with the .aiml extension, where it writes a new template and an answer to it. It is possible to train a chatbot using this file during a conversation of two interlocutors.
Here is description of chatbot’s features.
3. Correction mode
Examples of chatbot correction
You can correct a chatbot’s answer to a request if you don’t like it with the help of the “Submit correction” button.
We entered «hi», and the chatbot started giving us responses the way we needed.
Giving a number of variants at first, and after a series of repeated corrections it will give only one answer.
4. Chatbot connection
First we get in chatbot (sign in)
Then we open this page by clicking the gear icon (under the admin profile).
Now we want to connect our chatbot to Email ,Facebook, Twitter.
Enter the email address, user and password, then go to the page
The«Disconnect» button disconnects the bot from the email. «Check email» – the chatbot checks email every 5 minutes.
Now click “Twitter”.
Then click the link.
In Twitter click «Authorize».
Copy the pin code and paste to the home page.
Then click «Done». It’s almost ready.
Click «Сonnect» on the page. Ready. Twitter is connected.
Click «Disconnect» to disconnect the chatbot from Twitter. «Check status» is a response to messages.
Who did not dream about creation of one’s own chatbot on Facebook?
Just do the same as for Twitter.
Open a web page.
Get the code on «Embedding Code» and insert it on the site to activate a chatbot (not every browser has speech recognition; Firefox, for instance, does not have it. Speech recognition functions best of all at Google Chrome). Now let’s have a look at this page.
This is description chatbot’s looks. Here we can change its looks.
5. Samples of chatbot operation
We send a message to the chatbot’s email box.
Here’s a simple chatbot’s response to the message.
An example of a dialogue window (request).
An example of a dialogue window (response).
Our own test on EnduranceRobots.com
This is what the window looks like before sending message.
This is what the window looks like after sending message.
We hope that you will find this information useful, and more people will be willing to create and use chatbots.
Test our chatbot at EnduranceRobots.com. We’ll be happy to answer your questions and give additional comments.
Written by George Fomitchev, Skype: George.fomitchev