ChatterBot
我想为使用库编写的聊天机器人指定我自己对特定问题的答案。这是我的代码
from chatterbot import ChatBot
# Create a new chat bot named Charlie
chatbot = ChatBot(
'Charlie',
trainer='chatterbot.trainers.ListTrainer'
)
chatbot.train([
"who are you?",
"I'm a friendly chat bot"
])
# Get a response to the input text 'who are you?'
response = chatbot.get_response('who are you?')
print(response)
运行这段代码后的输出是
谁?谁只是遵循什么功能的一种形式
代替
我是一个友好的聊天机器人
所以看起来图书馆中嵌入了这个问题的预先指定的答案。如何配置仅使用我的答案的机器人?