Login With Github

Quick Start Guide For ChatterBot

The first thing you'll need to do to get started is install ChatterBot.

pip install chatterbot

See Installation for options for alternative installation methods.

Create a new chat bot

Note:If you are using Python 2.7, be sure that the unicode header is the first line of your Python file: # -*- coding: utf-8 -*-

from chatterbot import ChatBot
chatbot = ChatBot("Ron Obvious")

Note:The only required parameter for the ChatBot is a name. This can be anything you want.

Training your ChatBot

After creating a new ChatterBot instance it is also possible to train the bot. Training is a good way to ensure that the bot starts off with knowledge about specific responses. The current training method takes a list of statements that represent a conversation. Additional notes on training can be found in the Training documentation.

Training is not required but it is recommended.

from chatterbot.trainers import ListTrainer

conversation = [
    "Hi there!",
    "How are you doing?",
    "I'm doing great.",
    "That is good to hear",
    "Thank you.",
    "You're welcome."


Get a response

response = chatbot.get_response("Good morning!")



Thank for this great work.

I found an error for this line : 


Sytem info:

Windows 10, Anaconda distribution fo Python

Chatterbot version: 1.0.5

Error Message:

[nltk_data]     C:\Users\justi\AppData\Roaming\nltk_data...
[nltk_data]   Package averaged_perceptron_tagger is already up-to-
[nltk_data]       date!
Traceback (most recent call last):

 File "C:\Users\justi\.spyder-py3\temp.py", line 23, in <module>

AttributeError: 'ChatBot' object has no attribute 'set_trainer'

I have trained my basic chatbot on the full english corpus. From my INFO log

My input statements are all confidently matched with similar text by processing_search, but in every case I get:-

No responses found. Generating alternate response list.

No known response to the input was found.

followed by obviously a  rubbish response.

Any idea why?