Skip to content

Training

Gunther Cox edited this page Sep 7, 2015 · 11 revisions

For the training, process, you will need to pass in a list of statements where the order of each statement is based on it's placement in a given conversation.

For example, if you were to run bot of the following training calls, then the resulting chatterbot would respond to both statements of "Hi there!" and "Greetings!" by saying "Hello".

chatterbot.train([
    "Hi there!",
    "Hello",
])

chatterbot.train([
    "Greetings!",
    "Hello",
])

You can also provide longer lists of training conversations:

chatterbot.train([
    "How are you?",
    "I am good.",
    "That is good to hear.",
    "Thank you",
    "You are welcome.",
])

This will establish each item in the list as a possible response to it's predecessor in the list.