You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from chatterbot.conversation import Statement
|
|
|
|
from chatterbot.input import InputAdapter
|
|
|
|
from chatterbot.utils import input_function
|
|
|
|
|
|
|
|
|
|
|
|
class TerminalAdapter(InputAdapter):
|
|
|
|
"""
|
|
|
|
A simple adapter that allows ChatterBot to
|
|
|
|
communicate through the terminal.
|
|
|
|
"""
|
|
|
|
|
|
|
|
def process_input(self, *args, **kwargs):
|
|
|
|
"""
|
|
|
|
Read the user's input from the terminal.
|
|
|
|
"""
|
|
|
|
user_input = input_function()
|
|
|
|
return Statement(user_input)
|