@gunthercox I have connected my chatterbot with postgresql. And it had trained the data that I have specified in the file. So after training, it had created the db "jer".
Here's my code:
bot = ChatBot(
"Terminal",
storage_adapter="chatterbot.storage.SQLStorageAdapter",
trainer='chatterbot.trainers.ListTrainer',
database_uri='postgresql://postgres:root@localhost:5432/jer',
database="jer"
)
Can you please suggest me how to view the database in postgresql? I can see the db created but cannot see the data in the actual postgres database.
Can't we have control of the database that is created after running the chatterbot python code?
There are a number of ways to view data in a postgres database. The psql command line tool is quite useful (https://www.postgresql.org/docs/9.6/static/app-psql.html).
If a GUI option is preferred, there is also pgAdmin: https://www.pgadmin.org/
There are a number of ways to view data in a postgres database. The
psqlcommand line tool is quite useful (https://www.postgresql.org/docs/9.6/static/app-psql.html).If a GUI option is preferred, there is also pgAdmin: https://www.pgadmin.org/
@gunthercox Yes, you are right. But what I meant to ask was given the database-uri, my jer database is not affected at all even after the training.
What am I missing here??
@gunthercox I am able to solve the issue that I have instantiated here:)
I have used Mysql as my storage adapter and now I am able to save the data to the MySQL database and I can view it in the GUI mode too.
But I have a doubt: Why the data changed using my GUI is not affected?
Is there a solution to this?
I would be glad if you can help me here.
If you are manually editing the data in postgres the changes should be reflected by the ChatBot. I noticed that you have both database_uri, database set in the code you posted. Only one of these parameters should be used, not both. I'd recommend just using the database_uri parameter.
database_uri='postgresql://postgres:root@localhost:5432/jer',
database="jer"
I'd also like to note that I have not tested ChatterBot with Postgres, so there is a chance that you may encounter further issues such as #987
If you are manually editing the data in Postgres the changes should be reflected by the ChatBot. I noticed that you have both
database_uri,databaseset in the code you posted. Only one of these parameters should be used, not both. I'd recommend just using thedatabase_uriparameter.database_uri='postgresql://postgres:root@localhost:5432/jer', database="jer"I'd also like to note that I have not tested ChatterBot with Postgres, so there is a chance that you may encounter further issues such as #987
@gunthercox thank you so much it works like charm now:D
after running my chatbot python file the database is created and along with it, 6 tables are created which is the same as the SQLite database.
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
@gunthercox thank you so much it works like charm now:D
after running my chatbot python file the database is created and along with it, 6 tables are created which is the same as the SQLite database.