Last active
April 11, 2018 04:41
-
-
Save RootPat/b9cbda237253c50e17e668379d080872 to your computer and use it in GitHub Desktop.
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 | |
# Uncomment the following lines to enable verbose logging | |
# import logging | |
# logging.basicConfig(level=logging.INFO) | |
# Create a new ChatBot instance | |
bot = ChatBot( | |
'Terminal', | |
storage_adapter='chatterbot.storage.MongoDatabaseAdapter', | |
logic_adapters=[ | |
'chatterbot.logic.BestMatch' | |
], | |
filters=[ | |
'chatterbot.filters.RepetitiveResponseFilter' | |
], | |
input_adapter='chatterbot.input.TerminalAdapter', | |
output_adapter='chatterbot.output.TerminalAdapter', | |
database='chatterbot-database' | |
) | |
print('Type something to begin...') | |
while True: | |
try: | |
bot_input = bot.get_response(None) | |
# Press ctrl-c or ctrl-d on the keyboard to exit | |
except (KeyboardInterrupt, EOFError, SystemExit): | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment