I'm using the django integration.
settings.py
CHATTERBOT = {
'name': 'chatbot0',
'storage_adapter': "chatterbot.storage.SQLStorageAdapter",
'logic_adapters': [
'chatterbot.logic.BestMatch',
#custom adapters
'chatbot.adapters.adapter_1',
'chatbot.adapters.adapter_2',
]
}
But adapter_2 doesnt work unless I remover adapter_1, and vise versa. What is the problem?
The problem was the "confidence"; both adapters were working fine but the confidence of each was equal:
https://chatterbot.readthedocs.io/en/stable/logic/index.html
It is possible to enter any number of logic adapters for your bot to use. If multiple adapters are used, then the bot will return the response with the highest calculated confidence value. If multiple adapters return the same confidence, then the adapter that is entered into the list first will take priority.