Ohio Chat Rooms

Thanks for visiting Ohio Chat Club. Here you can find current news and events around Ohio. Chat with people form Ohio live, online, free. Join the Ohio chat room today. Ohio chat club rooms online community is for Ohio singles, couples & teens online. Download the Free Android Ohio chat rooms app. Share YouTube & Giphy in live chat with friends, upload files, custom avatars & pictures from Ohio.

How to build a chatbot in 15 minutes or less

Edward Leoni

Yes, you read it right! If you follow this article, you can build your own functional chatbot in under 15 minutes!

The final result is something like this:

Oh, and full disclosure: You will only type 11 lines of code to build this incredibly simple but reasonably scalable bot. Excited yet?

If you are new to Amazon Lex, you can try it for free. From the date you get started with Amazon Lex, you can process up to 10,000 text requests for free for the first year, after that it costs $0.00075 per text request, what that means is that you will pay $0.38 — yes thirty-eight cents — at every five hundred times your bot is texted. Very friendly pricing, no doubts.

Now go create that AWS account if you don’t have one, and if you do, go log in, I’ll be waiting here! But fast! We only have 15 minutes, remember?

Now look for Lex within the services tab, should look something like this:

Click on “Create” to create a new bot, the configuration of your bot should be as follows

I would explain all of this but we’re running against the clock here! Some highlights:

Output voice — Amazon Lex allows you to create more than text-based bots. You can automate entire call centers with it!

Try a sample — These samples are a very good way to get acquainted with the different features you can use.

I strongly recommend you come back later to try these different settings, for now, let’s keep moving!

Once you created your bot, let’s create our intent. Intents are the essentially the things you bot can understand, the more intents, the more things your bot can talk about. Since this is a bot that understands politics, let’s create our “trump” intent:

Utterances are essentially the different ways you can ask the same thing. Amazon Lex will take care of small variants and typos for you. What that means is that you don’t have to worry about your bots phrasing like “what u think of trump?“, Lex will make sure the bot understands that too.

So after you put the above utterances in, let’s make sure the bot can reply to them by scrolling down and filling the responses, like so:

Boom! Save the intent and your bot is now capable of talking about politics. Well, about Trump anyways. You will notice there’s an area on the right within Amazon Lex that allows you to test your bot. To test what we have just done, you will need to “Build” your bot first, so make sure you hit that button before testing it out! The test should look something like this:

We’re going to start coding your bot now so that it works outside Amazon’s dash! But first, there are a couple things we still need to do. The first one is publishing your bot. You can play around with your bot as much as you want, but your customers will only see these changes after you publish it. The publishing button is just beside the “build” button. You will be asked for an “alias”, an “alias” could be things like “production_environment” or “test_environment”. Let’s just name it “politicsbot” for now.

The last thing we need to do is to generate API keys for our application to access the bot.

Chop Chop! On Amazon, head to services again and look for “IAM”. Click on “Users” and add a new one. Name it “bot_user” and select the access type to “programatic”. Like so:

Great! We’re almost there. When asked about permissions, select “attach existing policies directly” and select “AmazonLexFullAccess”.

Hit create user! Save the “Access Key ID” and “Secret Access Key” given to you as we will use it soon.

You must be thinking “There is just no way we will make it in time!”. Well, remember I said all it takes to get this working is 11 lines of code?

To run this, create a python file named “bot.py” and run it by typing

python bot.py <aws_key_id> <aws_key_secret>

The only requirement is to have “boto3” installed, boto3 is Amazon’s Python library, install it by typing “pip install boto3”.

The code above is only compatible with Python 3.


I recommend you start playing around with Amazon Lex, add some more intents, make your bot really smart!

Alternatively, you can take my course on Udemy or read Amazon’s documentation which is full of useful information, it’s available in Kindle, PDF and other formats.

Recent Articles

Recently released video of protestors destroying car of a man with cerebral palsy that ran over a protestors bike.(5/31/2020) : Columbus

level 1Stuff like this makes me really sad, because I'm pretty sure the driver didn't mean to hit the guys bike. I'm surprised that...

How to Acquire Customers on WhatsApp | by Haptik

This is PART THREE of our series on WhatsApp Commerce. Read PART ONE and PART TWO.So your brand is now set up on WhatsApp...

Chatbots in Business Evolution. In mathematics, a type of variation… | by Peter Michael | Jun, 2020

In mathematics, a type of variation called direct variation describes ‘a simple relationship between two variables — such that we observe an increase of...

30-Story Hotel and Condo Building Proposed for Downtown

At a time when the coronavirus pandemic and a troubled economy have led to a slow-down in new development proposals, Michael Schiff is ready...

The Ohio Department of Health reported 1,494 newly confirmed cases on Friday, the largest daily increase since the pandemic began. : Columbus

Unless the state database has unique identifiers tied to test results, such as a SSN or something like that, I would assume the positive...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox