Created
September 3, 2018 02:09
-
-
Save math77/8c096634a39c92971f05853de8963c4a to your computer and use it in GitHub Desktop.
ChatBot básico feito com Python3 e a biblioteca chatterbot.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from chatterbot import ChatBot | |
from chatterbot.trainers import ListTrainer | |
chatbot = ChatBot("Jarvis") | |
conversation = [ | |
"Olá", | |
"Oi, tudo bem?", | |
"Tudo ótimo, e com vc?", | |
"Tudo muito bem.", | |
"Como vai sua família?", | |
"Muito bem, e a sua?", | |
"Bem também.", | |
"Tenho que ir agora, até mais!!", | |
"Até, tchau!!!" | |
] | |
chatbot.set_trainer(ListTrainer) | |
chatbot.train(conversation) | |
response = chatbot.get_response("Oi, como vai?") | |
print(response) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment