Hi! My name is Iurii Dziuban [ˈjurij dziuban'] and I like to make chatbots. This is the place where I sum up my learning progress, side projects and useful links.
My current coding experience at a glance (as of January 2020):
Playing with Dialogflow API, I created a simple chatbot which can be "taught" (expanded through adding new intents)
during the dialogue with this bot. That is if a bot doesn't understand something, it asks if it should store this phrase
with a corresponding response as a new intent. Thus this bot can be expanded in a rather "natural" way, through the
dialogue (as people do ;). Please see the detailed video tutorial about how to recreate such a bot.
This is my first modest experience with hardware stuff. Using Dialogflow and node.js I created a simple chatbot which
encodes user's input into Morse cypher. This bot returns dots and dashes to the Web Demo form and in parallel makes a
ESP32 board to blink the encoded message with a diode. The code for the board was written on JavaScript using ESPRUINO framework. Please see the detailed video tutorial about
how to recreate such a bot by yourself.
My company, Master of Code has many cool traditions. One of them
is Secret Santa - this is when each team member is assigned a random person to whom he/she prepares a New Year present.
And then there's a party with festive distribution of this gifts. This year (that is for NY 2020) I decided to prepare
something more than just a present and created a small IT quest which included a chatbot.
Please see this step-by-step
tutorial showing how it was done and feel free to use this idea/bot with your Company and/or friends. P.s. The idea of a
quest was inspired by this topic on Reddit about Secret Santa and The Architect (user squeakysqueakysqueak).
I decided to create a city quest in the format of a chatbot. But this time I decided to go further and try to create a
detailed video tutorial on how I'm currently creating my chatbot hobby projects. In this series of 11 videos (~2h in
total) you can find a step-by-step tutorial which is a summary of about 150 hours spent by me on this project (during 2019).
I share the webhooks code (as a Glitch remix) and can send collaborator invites on Chatfuel for you to access
the bot's flow (the Facebook Messenger bot is not public so far).
Here are some of the videos as an example (please see the full playlist):
On May 22, 2019, our company co-organized the event called IT Career Day 2019, an annual job fair where companies-members of IT Cluster of our town (Cherkasy, Ukraine) present themselves and promote the IT sphere in general.
I created a chatbot-quiz for this event where the users could answer questions and win real candies and other prizes (which were given at the Company's booth).
Some of the questions were to check user's attentiveness or maths skills but most were about knowing IT life and IT humour ;)
The bot is built on Chatfuel with a custom backend written on node.js and deployed as a Lambda function to AWS.
The main purpose of the backend is connecting Dialogflow to Chatfuel (plus also generating verification code and providing some other minor features).
The bot uses Chatfuel's built-in export to Google Sheets, send-to-email and human handover functionality.
When the user finishes the quiz and clicks "Get candies" a notification email is sent to admins containing user's info (name, gender, locale, a link to FB profile info etc), the verification code, number of candies that the user has won and also his/her answers to the quiz.
Similar results (but without responses to the quiz) are also saved to a Google Sheets document.
Navigation in the bot is possible using quick reply buttons and text commands (thanks to Dialogflow). The bot reprompts the last block of contents in case the user entered something irrelevant or accidentally entered some text so that quick reply buttons disappeared.
Bot launch results: During the event about 150 people played with the bot with ~60% coming to the Company's booth for the prize. The users seem to have liked the bot and also were often surprised when we called them by name even before they introduced themselves ;) (having their name and often a real profile photo received from the bot).
Found some time to get acquainted with ImageMagic. Messenger has powerful built-in drawing capabilities but I thought
that it might be good to make a chatbot able to process images according to given templates (e.g. add a company logo or
create some stylized stickers for sharing in the conversation). I failed to finish this bot due to time
limitations/other more important tasks but got some useful experience and additional practice in chatbot building. Maybe
I'll use/reuse it in some other projects later.
The flow was supposed to be the following: the bot greets the user and
offers a list of templates to choose from. Only 1 was template was finished - a so-called "Polaroid" (converts a photo into
the polaroid-style image with custom text title). Many other templates could be added (e.g. I've thought of "Visa" -
upload photo[-s] and indicate a country to get a photo collage with some visa-style stamps/stickers added, "Logo" - adding a company logo or other symbolics to uploaded photos etc). The user chooses
a template and then is asked to provide the needed data (photos, titles etc). The source and the final processed images
are stored on AWS S3 with links saved for this user in DB (so that one could create own sticker "packages" in
Messenger).
Since my last update of this site I launched my first multi-platform chatbot - Podervianskogobot.com. This is a bot which replies
with popular quotes (drawn on stickers) from plays by Les' Poderviansky (the bot is in
Ukrainian) and allows to read and listen to respective plays performed by the Author. Les Podervianskyi is a
Ukrainian painter, poet, playwright and performer. He is most famous for his absurd,
highly satirical, and at times obscene short plays, many quotes from which became popular memes (more on Wikipedia).
I started to work on it last summer (>6 months ago), before I started to cooperate with Master of Code. Thought that it would be funny to make
such a bot, and also had a chance to try several new things, mainly RiveScript and npl.js (inspired by this article).
This was also my 1st 'live' bot on MS Bot Framework and the 1st bot for Skype and Web.
To make this bot I:
Read through >25 plays by L.P. from this source,
chose the most popular quotes (got ~140 of them);
Took the most popular requests from Dialogflow's Smalltalk and assigned quotes from L.P.'s plays as
responses to those requests;
Contacted with Les Podervianky's representative to discuss copyright moments and got an approval;
Draw stickers for all those quotes + separate stickers for the plays (~140 in total, this took up to 60%
of time working on this project ;);
Copied, parsed and formatted the texts of the plays, downloaded and prepared the audios.
Created the bot itself on Node.js using Microsoft Bot Framework for 4 platforms (Telegram, Facebook,
Skype, Web). Also wanted to make a version for Viber but their current policy doesn't allow that :(
The bot is actually quite simple - after greeting each user's input is "fed" to NLU block which tries to
respond with a relevant quote. If no intents are triggered then a simple full-text search is made and the user is
presented with a list of plays in which his/her input was found. If no such phrases were found, the user gets
a default fallback response.
In this bot I used an open source library for NLU nlp.js inspired by the above-mentioned article. My
conclusion for npl.js - a nice tool and could be used if third-party solutions are not allowed for some
reasons but for production I would still use Dialogflow or LUIS.
Deployed the bot to an AWS EC2 instance. This bot is not using DB and ElasticSearch (thought these could
be used and could improve the bot) and thus can be hosted on a single t2.micro instance which is free
under the free-tier plan.
So far the bot had about 30 users from Facebook, ~10 from Telegram and a few from Skype and Web version.
So starting from September 18, 2018, I switched from self-educating in hobby mode 2-4 h/day to building
chatbots
full-time for Master of Code. So I will probably have
less time for my side projects but will try to hold on ;)
In October I got acquainted with Actions on
Google and built 2 simple voice bots for Google
Assistant platform using
Dialogflow and Cloud Functions for Firebase. One of
these bots, BestMovieQuotes, was
approved by Google and is publicly available now (though not for all countries and/or locales - you may need to
switch
to English as a basic language on your device). So it's a quite simple bot, actually, a stripped down
Dialogflow's small talk agent that answers with audio-quotes from
famous movies (like "The Godfather", "Casablanka", "The Lord of the Rings", "Titanic" etc.).
It gives more or less relevant responses to phrases like 'hello', 'how are you', 'what's up', 'what is
life/love',
'bye' etc and you can also ask it for a random quote. You can try it on your smartphone in Google Assistant
app (Android, iOS) or on devices like Google Home etc.
To invoke the bot please say something like 'Ok Google, talk to Best Movie Quotes' or 'Ask Best
Movie Quotes for a random quote'.
P.s. A few words about how I got
this bot approved and included into Google Actions directory: it wasn't so straightforward, I succeeded only
after 3
tries ;) The problem was that I wanted my bot to conduct a more or less 'natural' talk,
listening to user's phrases and responding with relevant quotes. But the guys approving the app wrote that
"During our
testing, we found that your app would sometimes leave the mic open for the user without any prompt".
I tried to prompt the user to continue dialogue using the quote "Talk to me goose" from "Top Gun"
which I added after each response but this variant was also rejected. So
finally I put an explicit 'robot-read' prompt after each quote - it's not really what I wanted and sounds a
bit weird but probably is more correct.
As for the 2nd bot. We had a Halloween party here at MOC, and I also built a simple voice bot especially for
this event -
CreepySounds. I didn't submit it
to Google Actions directory so this bot
isn't available publicly. But in case you'd like the idea you may use my code and easily make one for
yourself (it should be accessible as a test version on devices where you're logged in).
This bot responds to any voice input by a random scary sound (taken from Google sounds library, mainly Horror sounds).
I got a full-time job as a chatbot developer!
This post is not about another chatbot of mine but about an important event in my coding career: I got hired and
now work at Master of Code (FB, www)!
Just a quick summary of my journey to this stage: I'm a biologist by education, last 10 years have been
working as an
English-Russian medical translator. Married, we have 3 small kids (<6 years old). I started to learn coding 11
months ago, in Oct 2017 when I was 34. I was studying for 2-4 hours a day after my main work and on weekends,
~80 hours/month. By the moment I got a job I have been self-educating for ~840 hours net. I was making small
projects (9 in total). Created 8 chatbots. Started from Python but then moved to Node JS. For more info –
please see below. I had 2 interviews, both at the company for which I’m working now. Still getting used to the
new format of work/life (as of Oct 11, 2018, I’ve been working for 3 weeks). A long and exciting way ahead… ;)
'GuessThePlaceBot'TelegramGithub (August 2018)
Do you know your city well? Can you recognize its places by street view photos? Play a game with GuessThePlaceBot and check that ;)
This is a Telegram bot that asks to identify places in a chosen city by Google Street View images.
Built using NodeJS for bot logic, Telegram Bot API (Telegraf wrapper), hosted on AWS Lambda, stores conversation state in PostgreSQL DB
(AWS RDS).
Note: Doesn't work on Telegram Desktop or Telegram for Web (platforms limitation - don't allow to
send location)
September 30, 2018: Presented the bot in blog findthisplace.d3.ru, getting feedback..
'FinishPhraseBot'Web DemoGithub (July 2018)
It's always more interesting to learn something on practice ;) So learning PostgreSQL I decided to write a
simple bot that tells the beginning of a phrase (for eg., of a proverb) and asks the user to finish it.
It uses Dialogflow for conversation construction with webhooks on Node JS, and PostgreSQL for storing
questions. But to make this bot a little bit more original I also attached a voice "frontend" written by Jaanus Kase.
Give it a try ;) (works in Chrome for desktop or Android; as the webhook is hosted on Heroku and goes to
the sleeping mode in 30 min if not used, so the 1st response may take some time or may be empty).
P.s. This bot also understands SQL and the database it works with can be managed through the bot itself
(see video; I won't provide the link to the text-only version of this bot though ;)).
FoodCompositionBot is a simple chatbot that analyses food by image (or at least does his best to do that
;) Give it a try by uploading a photo from your camera or photos, posting a link to an image with food or
simply typing a food name.
This bot was written using NodeJS, Google
Vision API for image content analysis, Nutritionix API as the nutrients data source and Facebook Messenger APIs. P.s. It's
hosted on Heroku so don't be surprised if it starts the conversation with some delay ("cold" start may
take up to 6-10 seconds)
'Fellowtraveler-website'Github | 'Fellowtraveler-Telegram chatbot'Github | 'Fellowtraveler-Facebook chatbot'Github (March-June 2018 [project stopped])
This is supposed to be an entertainment project/social experiment - a toy 'travelling' across the globe
being passed between accidental people. Built on Python using Flask, MongoDB and APIs for GoogleMaps,
Dialogflow and messengers (Telegram, Facebook). A chatbot (2 integrations - Telegram & Facebook) and a
website working with the same database.
Update - 02 June 2018: Website and chatbot for Telegram are almost done. Hope to make a
version for FB Messenger and launch the project soon.
Update - 11 July 2018: Due to other training tasks with higher priority I had to pause my
work on this project (but still hope to finish it and launch). Website and Telegram bot are almost ready,
Facebook bot is ready for ~80%.
Update - 18 December 2018: Eh.. Still, no time to finish this project. Telegram bot and
website off. Who knows maybe one day I will rewrite it on node.js (I still like the idea).
'Remindmebot'Github (May 2018)
On May 16 2018, I visited IT
Career Day 2018 in Cherkasy, a so-called "IT-job fairs", which was the 1st event of such type for me.
There I spoke with representatives of several companies.
Preparing for this event I looked through websites of main companies and came to know that Master of Code (MOC) is making
chatbots. I had a talk with guys from MOC and they suggested me to
perform a test task writing a bot on node.js. I took this challenge. Though all my previous projects were on
Python, I never coded on Javascript before and in general up to 3/4 of instruments used in this project were
new for me, I seem to have coped with
the task. You can read a bit more about how I made the way from my first "Hello world" on JS to writing and
launching Remindmebot
in 60 hours here.
About this chatbot: it's a bot-reminder written on Node.js using Dialogflow and Facebook Messenger APIs
and MongoDB. It can create reminders using NLU (for example it can understand phrases like "Remind me to go
cycling at 7:00 on Mondays, Wednesdays and Fridays"), delete all or one specific reminder and alert
reminders which can be "confirmed" or "snoozed".
'SharedExpensesBot'Github (February-March 2018)
The idea for this training mini-project was suggested by my brother who said that it would be nice to have a
chatbot that could help to track shared expenses during travels with friends.
For example, when one pays for an apartment, someone else for dinner, the 3rd one for gas, another
food/drinks/tickets etc (as an alternative to chipping in with equal sums each time). More detailed
information - see github or Dialogflow's forum.
Topics learnt/covered in this project: plain python, MongoDB, dialogflow and telegram/facebook
integrations.
'PlotBot'Github
(February 2018)
Learning to build chatbots on dialogflow.com platform I decided to
create a PlotBot - a chatbot which builds charts (using pygal python library for charting).
This chatbot used Telegram, Facebook Messenger
and a Web Demo integrations. As of Jan 2020 the the webhook is disabled and the bots are inactive. More detailed information about this chatbot on github or Dialogflow's forum.
Topics learnt/covered in this project: dialogflow, Heroku, pygal, dialogflow and telegram/facebook
integration.
Other, non-chatbot projects
'Food
Composition'Github (January-February 2018)
My 2nd real mini-project. Done in Jan 2018. A Flask app that tries to determine an approximate percentage of
fats, carbohydrates and proteins in food by image.
Made for fun. Still thinking how to filter non-food images ;) Uses Google Vision API and Nutritionix API.
Additionally created [what appeared to be my 1st] simple chatbot (see
it below on the right) on dialogflow.com platform that can tell
fats/carbohydrates/proteins % content for the food user enters (Telegram integration was also used).
As of Jan 2020 the the webhook is disabled and the bots are inactive.
Topics learnt/covered in this project: Flask, REST API (Google Cloud Vision API, Nutritionix API),
bootstrap, plot.ly, deployment to a server, dialogflow, Heroku.
'Car-price-age-mileage'Github (November-December 2017)
My 1st real mini-project. Started on 01.11.2017 after learning Python/coding for ~175 hours (3-3.5months) in
total, done in ~70 hours.
A Flask app that allows a user to choose a car model and get scatter charts showing how this car's price is
changing depending on its age and mileage.
Data is requested from auto.ria.com (the biggest Ukrainian advertisement
board for vehicles) using their API.
Charts (for age & price, price & mileage and age & mileage) are drawn using 2 charting engines/libraries -
pygal and plot.ly.
About 50% of time working on this mini-project was spent learning how to create a user management system in
Flask (register, login, profile update, password update, password reset, avatar functions).
App has a preferences page (accessible for registered and logged in users) where a user can change 2
parameters: advertisements quantity for the model being analyzed (5-50) and the charting engine.
Topics learnt/covered in this project: Flask (including the creation of user management system),
vagrant, git, virtualenv, REST API, requests, JSON parsing, charting (pygal, plot.ly), MongoDB,
bootstrap, deployment to server.
I’m 36, I was born and live in Ukraine (Cherkasy). I came to coding from
biology (have a master’s degree in human physiology, unfinished PhD; while
studying at school and university was a winner of All-Ukrainian Biological Olympiads). I have >10-years of
experience as an English>Russian medical translator (TA Medconsult),
translated for Novartis, Pfizer, Roche, Bristol-Myers Squibb, Sanofi, Regeneron Pharmaceuticals etc. Passed a 2-month internship in a molecular biology lab INSERM
U963 / CNRS UPR9022 (Strasbourg, France).
Learning to code since October 2017. From September 18, 2018 work as a chatbot developer (node.js) at Master of Code.
I’m married, we have 3 kids (born in 2012, 2014 & 2014), trying to keep a more or less healthy balance between work and
family/life. I like mounting biking – Strava (log in needed).