Clean history of chat bot

Hello Lovely people,

i am new to botpress loving it so far. I want to delete the chat history but have no idea where i can do this?

Is it possible to delete chat history?

Hi @Soufyanbreda yes, but only manual. You need delete table for message(for every module is other)

1 Like

Thanks for your reply can you show me where i can find this table?

You can use http://sqlitebrowser.org/ tool for browsing the db.sqllite file under .data folder. Hope this helps!!

2 Likes

Thanks so much it works great!

1 Like

I’d be interested where to find this db.sqlite exactly with recent versions?

What do you mean @JustusNBB ?

Let me break it down quickly for you. As stated in the docs, you can run botpress on either sqlite (default) or on postgresql.

To inspect the sqlite database. find your data folder and you’ll find a storage folder with a core.sqlite file. Here’s a what I’m talking about in case is unclear.

Screen Shot 2020-12-03 at 3.21.21 PM

Does that answer your question ?

2 Likes

Oh right there is actually a storage folder when starting without DATABASE_URL and sqlite (and postgres respectively) save chat history in tables like web_messages and dialog_sessions.

Thanks for clarifying, I was confusing it with BPFS storage ‘disk’ mode!

Sir, I am a beginner…could you please elaborate actually what to do…

Sqlite3

By default, botpress is using the sqlite3 database.

$ pwd 
/Users/botpress/github/botpress/
$ cd out/bp/data/storage
$ sqlite3 core.sqlite

Inside the sqlite3 database

sqlite> delete from messages;

The messages table contains the history of the chat.

Postgresql

You can use the psql tool to delete the table messages or a GUI tools.