How to make a basic chatbot in Python

Elizabeth Gallop
2 min readDec 11, 2020

--

What can chatbots be used for?

Chatbots can be used for a variety of tasks such as customer service, immediate service for crises, and even translators! Especially in 2020, when everything seems to be crashing down on the world people may need more help for grocery shopping or mental health issues. Grocery shopping can be done with basic inputs and keywords making lists for shoppers to reduce the risks of infection. Also, chatbots for mental health may be immediate service at any time for people who are at risk of issues like suicide or self-harm. Overall chatbots are quite useful in communications with customers and many others.

How do you make one?

  1. First, you must prepare the dependencies. You need to take this as a first step in python chatbots to install the libraries needed for this project on Visual Studio

Seen here-

2. Next import the classes with this code- if you encounter any issues check over the installations and spaces.

3. After downloading the ChatBot systems next you need to train it, use this code:

Note: you can have your chatbot discontinue learning and adapting with the command “read_only=True”

Another way to train your chatbot:

4. You can train your chatbot to have normal conversations.

As seen here:

5. Continue to train your chatbot!

With the information above you can train a chatbot to have typical conversations and learn multiple languages.

--

--

No responses yet