chatterbot python 1

chatterbot python

from chatterbot.trainers import ListTrainer

trainer = ListTrainer(bot)

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

Here is what the above code is Doing:
1. We are creating a new trainer for the chat bot.
2. We are using the ListTrainer to train the chat bot.
3. We are providing a list of strings to the trainer.
4. The chat bot is learning how to respond to each statement.

Similar Posts