Aug 28, 2017 · 1 min read
CHATBOT = ChatBot(“yourbotname”,
storage_adapter=’chatterbot.storage.SQLStorageAdapter’,
input_adapter=’chatterbot.input.TerminalAdapter’,
output_adapter=’chatterbot.output.TerminalAdapter’,
logic_adapter=[
‘chatterbot.logic.MathematicalEvaluation’,
‘chatterbot.logic.TimeLogicAdapter’,
‘chatterbot.logic.BestMatch’
],
database=’./path/db.sqlite3')
print(“Hello Bigboss type something to teach me…”)
while True:
try:
BOT_INPUT = CHATBOT.get_response(None)
except (KeyboardInterrupt, EOFError, SystemExit):
break
print(“Bye Bigboss see you soon…”)
ประมาณนี้นะครับ สามาถทดสอบผ่านทาง terminal ได้เลยครับ :)