Hello,
i’m developing a ML Arabic Chatbot using the Chatterbot in a Django application.
So, i set the setting file as follow:
CHATTERBOT = {
'name': 'Female_bot',
'storage_adapter' : {'import_path': 'chatterbot.storage.SQLStorageAdapter','database': 'Female'},
'logic_adapters':[
{"import_path": "chatterbot.logic.BestMatch",},
{'import_path': 'chatterbot.logic.LowConfidenceAdapter','threshold': 0.5,'default_response': 'UNK'},],
'trainer': 'chatterbot.trainers.ChatterBotCorpusTrainer',
'training_data': ['chatterbot.corpus.Arabic.Fcon'],
}
CHATTERBOT = {
'name': 'Male_bot',
'storage_adapter' : {'import_path': 'chatterbot.storage.SQLStorageAdapter','database': ‘Male'},
'logic_adapters':[
{"import_path": "chatterbot.logic.BestMatch",},
{'import_path': 'chatterbot.logic.LowConfidenceAdapter','threshold': 0.5,'default_response': 'UNK'},],
'trainer': 'chatterbot.trainers.ChatterBotCorpusTrainer',
'training_data': ['chatterbot.corpus.Arabic.Mcon'],
}
and added the app 'chatterbot.ext.django_chatterbot’, to INSTALLED_APP list. after that i want to train it but i got this:
[mansard@web569 src]$ python3 manage.py train
Mcon.yml Training: [####################] 100%
ChatterBot trained using “ChatterBotCorpusTrainer
The Female chatbot is not trained.
After the training the two bot the result was ( Male.db with the the Mcon crops data in it - Female.db with not data)
@EmanSaad11 I think you are using same setting file for your two objects, But chatterbot is considering only one configuration dict at a time, see here
Currently chatterbot supports only one database at a time to perform different DB operations.
@vkosuri so there is no way to create two chatterbot in Django? because i need two chat bots with two different DB
Yes, this is possible with different ports.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@EmanSaad11 I think you are using same setting file for your two objects, But chatterbot is considering only one configuration dict at a time, see here
https://github.com/gunthercox/ChatterBot/blob/c3163c84e0c18dc712ea0a449175b5eff4ccd0e6/chatterbot/ext/django_chatterbot/management/commands/train.py#L17
Currently
chatterbotsupports only one database at a time to perform different DB operations.