Training Django ChatterBot
See original GitHub issueHi,
since the command (with the new version of ChatterBot) python3 manage.py train
is no more supported, how can I train my online bot implemented with Django? I read that I have to create a new python file train.py
, but I tried and I didn’t solve the problem.
This is part of my settings.py
file:
CHATTERBOT = {
'name': 'My Online Bot',
'django_app_name': 'django_chatterbot',
'storage_adapter' : 'chatterbot.storage.SQLStorageAdapter',
'database_uri' : 'sqlite:///online_bot_database.sqlite3',
'logic_adapters' : [
{
'import_path': 'chatterbot.logic.BestMatch',
'statement_comparison_function': 'chatterbot.comparisons.levenshtein_distance',
'response_selection_method': get_first_response
},
]
}
How to properly set up the train.py
file for this bot?
Thanks in advance,
Alan
Issue Analytics
- State:
- Created 5 years ago
- Comments:13
Top Results From Across the Web
Django Integration — ChatterBot 1.0.8 documentation
ChatterBot has direct support for integration with Django's ORM. It is relatively easy to use ChatterBot within your Django application to create ...
Read more >Ramping up a ChatBot, integrate with Django and deploy on ...
This blog will technically guide you how to end up with an innovative machine-learning ChatBot (webApp), ramped-up over ChatterBot and Django frameworks and ......
Read more >Build Chatbot Using Django - Udemy
This courses will teach you How to Build a Complete Smart Chatbot as a Personal Assistant Using Django & AI. The chatbot will...
Read more >Build a ChatBot Using Python, Django - Documatic
WebSockets using Django Channels - To send to the client the automated response generated by the machine learning model immediately when ...
Read more >Create Web Based ChatBot in Python, Django, Flask
We will create a Chatbot using Python, Django, Flask and Chatterbot. ... Then we are training our chatbot with ListTrainer with our personal ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Working example for train command - https://bitbucket.org/voron-raven/chat/src/master/core/management/commands/train.py
For me, using the SQLStorageAdapter was not good enough because then the data would not show up in Django admin, but using a separate train.py with the
chatterbot.storage.DjangoStorageAdapter
that thechatterbot.ext.django_chatterbot
app uses resulted in adjango.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
error.I did get it working by creating a custom manage.py command in my own Django application using the folder structure described in https://docs.djangoproject.com/en/3.2/howto/custom-management-commands/
and with the following management/commands/train.py
Edit: and then finally you can use
python3 manage.py train
again 😃