from chatterbot import ChatBot
import logging
logging.basicConfig(level=logging.INFO)
chatbot = ChatBot( 'CISO',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
database='./database.sqlite3',
trainer='chatterbot.trainers.ChatterBotCorpusTrainer',
preprocessors=[
'chatterbot.preprocessors.clean_whitespace'
],
logic_adapters=[
{
'import_path': 'chatterbot.logic.BestMatch'
},
{
'import_path': 'chatterbot.logic.LowConfidenceAdapter',
'threshold': 0.65,
'default_response': 'unknown.'
}
]
)
#chatbot.train("/home/pi")
# Get a response to an input statement
resp=chatbot.get_response("what is cyber security")
print(resp)