Chatterbot 启动命令而不是输出字符串

Chatterbot start a command intead of output string

我在 Chatterbot 的文档网站上看到了一些示例代码

from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer

# Create a new chat bot named Charlie
chatbot = ChatBot('Charlie')

trainer = ListTrainer(chatbot)

trainer.train([
    "Hi, can I help you?",
    "Sure, I'd like to book a flight to Iceland.",
    "Your flight has been booked."
])

# Get a response to the input text 'I would like to book a flight.'
response = chatbot.get_response('I would like to book a flight.')

print(response)

是否有可能告诉机器人从终端启动命令而不是 post 字符串答案?

如果有python3,则使用input;如果python2

,则使用raw_input
while True:
    question = input("")
    response = chatbot.get_response(question)
    print(response)