From 9ace3da9a62d8933e0bafb1b7a970205aa154aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas?= Date: Sat, 20 May 2017 13:15:10 +0200 Subject: [PATCH] Changed trainers --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index 1a8d82d..a219226 100644 --- a/main.py +++ b/main.py @@ -13,6 +13,7 @@ from config import config from simphaty import analyze from chatterbot import ChatBot +from chatterbot.trainers import ListTrainer, ChatterBotCorpusTrainer # Enable logging @@ -75,10 +76,12 @@ def randomchat(bot, update): chat_history[update.message.chat_id] = msg else: + chatbot.set_trainer(ListTrainer) chatbot.train([prev, msg]) def initial_training(bot, update): + chatbot.set_trainer(ChatterBotCorpusTrainer) chatbot.train("chatterbot.corpus.spanish") bot.sendMessage(update.message.chat_id, text="Entrenamiento inicial completado.")