yaml文件:
- - Invalid Password
- contact xyz@gmail.com
我正在使用 python Chatterbot 库,如果我询问无效密码,它返回响应联系人 xyz@gmail.com,但如果我询问密码无效,它会给我我在创建聊天机器人实例时设置的默认响应。
bot = ChatBot(
'Norman',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
input_adapter='chatterbot.input.TerminalAdapter',
output_adapter='chatterbot.output.TerminalAdapter',
logic_adapters=[
{
'import_path': 'my_logic_adapter.MyLogicAdapter',
"statement_comparison_function": "chatterbot.comparisons.JaccardSimilarity",
"response_selection_method": "chatterbot.response_selection.get_random_response",
'threshold': 0.65,
'default_response': 'I am sorry, but I do not understand.'
}
],
filters=["chatterbot.filters.RepetitiveResponseFilter"],
preprocessors=[
'chatterbot.preprocessors.clean_whitespace',
'chatterbot.preprocessors.unescape_html',
'chatterbot.preprocessors.convert_to_ascii'
],
database='./database.sqlite3',
trainer='chatterbot.trainers.ListTrainer'
)
bot.set_trainer(ListTrainer)
Helenr
相关分类