mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-11 18:43:44 -05:00
[PR #535] [MERGED] Add validation for chatGPT imports, stopping any breaking issues with imports of incompatible chats #20363
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/535
Author: @bhulston
Created: 1/19/2024
Status: ✅ Merged
Merged: 1/21/2024
Merged by: @tjbck
Base:
main← Head:fix/chat-imports📝 Commits (1)
4d85e2cAdd validation for chatGPT imports, stopping any breaking issues when imports are corrupted/not compatible📊 Changes
1 file changed (+57 additions, -17 deletions)
View changed files
📝
src/lib/utils/index.ts(+57 -17)📄 Description
Tested on 1000 chats from 3 separate people...
chatGPT imports might use external tools like Dall-E or there also might be corrupted chats that were interrupted several times from users.
To deal with this, I basically added a new validation function to make sure the chat imports look good and a new try catch block for any bad imports. In the case that they do not, we just won't include them.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.