DEV Community

Cover image for Build a Chatbot with Vanilla JavaScript

Build a Chatbot with Vanilla JavaScript

Emmanuel Ugwu on July 12, 2021

Recently, I visited a website, and while surfing through it, the website's chatbot caught my attention. I had been looking for a new project to wor...
Collapse
 
ninjaasmoke profile image
Nithin Sai K J

Not to be blunt, but that is NOT how one should implement a BOT. This is just a program that generates predefined responses. A bot, on the other hand needs to understand context (of previous messages) and formulate new answers.

Collapse
 
ugwutotheeshoes profile image
Emmanuel Ugwu

I understand, the plan here was to create something which exhibits some behaviours of a bot.

Collapse
 
johnjacobkenny profile image
Kenny John Jacob

Nice first post, I agree with Nithin, this is too simple for calling it a "chatbot". But it's a good start, and you can look into RASA as a backend which is open source and helps you build a real bot. Or something like dialogflow 😊

Thread Thread
 
ugwutotheeshoes profile image
Emmanuel Ugwu

Thanks a lot. I'll try it out then.

Collapse
 
weltam profile image
Welly Tambunan

hi, maybe you could try to combine the bot with this rasa.com/

it's a great framework. and it's fun to use.

Collapse
 
ugwutotheeshoes profile image
Emmanuel Ugwu

Thanks, I'll try it out.

Collapse
 
madza profile image
Madza

Hearing 'vanilla' in JS ecosystem in 2021 is as rare as hen's teeth 😃😃
Good job on this 😃😃

Collapse
 
ugwutotheeshoes profile image
Emmanuel Ugwu

Haha, thanks Madza.
I'm just a beginner, eventually I'll get better.

Collapse
 
uzair004 profile image
Muhammad Uzair

Nice but i guess bots are supposed to be AI based

Collapse
 
shikkaba profile image
Me

This is a form of AI. Rudimentary, but still AI is just code. The more complex it is, the more intelligent it appears.

Collapse
 
faaktap profile image
Fakie Tap

I think a fun way to hone your skills, would be to create the animals game in javascript.
See ulisp.com/show?1LKX

Collapse
 
gadrawingz profile image
Gad Iradufasha

Useful tips for building basic stuff!