mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[GH-ISSUE #1712] Chat DB download missing user chats #12606
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Apr 24, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1712
Bug Report
Description
Bug Summary:
I as the Admin downloaded the entire database and opened the .db file in SQLite viewer.
I could see all the users registered on the host, but the db did not have their chats in it when I opened it.
The chat session history is needed for audit purposes and reporting.
I set the permissions for user role to "downt allow chat deletion".
Are all the prompts and responses for all users supposed to be logged in the SQLite db?
Steps to Reproduce:
Downloaded the db a couple of times, but no luck finding other user role chats.
I was able to see their chats when downloading the JSON with all chats, but this is less useful vs having the chat session history in a db.
Expected Behavior:
I was hoping to see all the chats for all users in the db after the download.
Actual Behavior:
I am only seeing my own chats.
Environment
Open WebUI Version: [0.1.120]
Operating System: macOS
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
[Include relevant browser console logs, if applicable]
Docker Container Logs:
[Include relevant Docker container logs, if applicable]
Screenshots (if applicable):
[Attach any relevant screenshots to help illustrate the issue]
Installation Method
[Describe the method you used to install the project,: Docker
@justinh-rahb commented on GitHub (Apr 24, 2024):
I would try copying it from the container manually to verify there's no user chats showing in it:
Can you also share how and what query you're using to extract user chats?
@ghost commented on GitHub (Apr 24, 2024):
Thanks @justinh-rahb the file copy works fine on CLI per your command above. It yields the same result as the "download the database" command from the GUI. Both methods do not show user chats other than my own. I am using SQLite Browser to view the files, I have not yet started creating SQL to query the db as I dont have the full db yet...
In the admin role, I have set the "chat delete" off so that users have not been able to delete their own chats.
Any thoughts?
@ghost commented on GitHub (Apr 24, 2024):
@justinh-rahb I am assuming that all chats from all users are always supposed to be stored in the SQLite db?
@justinh-rahb commented on GitHub (Apr 24, 2024):
I see different

user_ids listed in your screenshot, you're saying these are all you? My eyes are telling me a different story.