Hi,
I am creating a chatbot application using Django and Chatterbot and setting the basic static data in the "training_data" parameter,
CHATTERBOT = {
'name': 'ChatterBot Example',
'trainer':'chatterbot.trainers.ListTrainer',
'logic_adapters': [
'chatterbot.logic.BestMatch'
],
'training_data': [ "How are you?","I am good.", "That is good to hear.","Thank you","You are welcome." ],
'django_app_name': 'django_chatterbot'
}
When i run the application in browser, not able to get the response which i am setting in training_data.
Can someone please let me know how to set the data here?
The reason you were not getting response from chatbot because you haven't trained your bot. Training bot from Django interface is different form regular chatterbot.
python manage.py train
More information about Django training available here http://chatterbot.readthedocs.io/en/stable/django/training.html
@vkosuri : Thank you so much for the response,
The response is not as expected. Meaning it is responding with 'hello' all the time. Even after running the train command
Now i am training the python as mentioned "python manage.py train". The code mentioned below.
CHATTERBOT = {
'name': 'Tech Support Bot',
'logic_adapters': [
'chatterbot.logic.BestMatch'
],
'trainer': 'chatterbot.trainers.ListTrainer',
'training_data': [
'Hello','hi there!'
]
}
Also,Can anyone please let me know is there any specific set response we can get for particular response, for example,
'training_data': [ {"how are you":"I am doing great"},{"Hello":"hi there!"} ]
Something like the above
Thanks in advance
Is this what you want?
http://chatterbot.readthedocs.io/en/stable/logic/index.html#specific-response-adapter
Training with the default settings.py doesn't seem to do anything for me as well. Still results in Hello responses.
I've labeled this as a possible bug. I will investigate this as soon as possible.
@gunthercox hi,i run the python manage.py train but the response is not what i want .did this bug had fixed?
using sql databases with django seems to be resulting in wrong training i.e responses mapping to wrong input statements
@ahmedshoaib are you suggesting that using a different database like mongodb could potentially solve this problem?
@gabru-md yes mongodb works perfectly fine with the django_app (I.e with use_django_models : False). There seems to be a problem in storing training data in relational dbs.
i have the same problem ,iam wondering how to use mongodb with the django
@saraalosaid If you want to use MongoDB and Django then you will need to configure configure Django's storage backend to use one the is build for MongDB. I highly recommend Django MongoDB Engine for this: https://django-mongodb-engine.readthedocs.io/en/latest/
@gabru-md did it work using mongo DB?
I am getting this error
FileNotFoundError: [Errno 2] No such file or directory: 'How are you?'
Most helpful comment
@vkosuri : Thank you so much for the response,
The response is not as expected. Meaning it is responding with 'hello' all the time. Even after running the train command
Now i am training the python as mentioned "python manage.py train". The code mentioned below.
Also,Can anyone please let me know is there any specific set response we can get for particular response, for example,
Something like the above
Thanks in advance