mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-14 02:55:00 -05:00
feat: import chats from chatgpt #142
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 @MaKraMc on GitHub (Jan 1, 2024).
Bug Report
Description
Bug Summary:
When importing an export from OpenAI ChatGPT, only the chat titles are imported.
Steps to Reproduce:
Settings>Chats>Import Chatsto upload the json file.Expected Behavior:
All chats and the messages inside these chats are imported.
Actual Behavior:
Only chat titles are imported, clicking on them just loads the first message of the currently selected chat (generated inside ollama). It seems that the content of the desired chat can not be loaded correctly.
Environment
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
Docker Container Logs:
Screenshots (if applicable):
[Attach any relevant screenshots to help illustrate the issue]
Installation Method
Docker (compose)
Additional Information
My export from openAI is about 2.7 MB in size.
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
@tjbck commented on GitHub (Jan 2, 2024):
Hi @MaKraMc, Thanks for creating this issue! FYI, Import/Export Chat logs feature is for Ollama WebUI Only, and is not compatible with ChatGPT at the moment. However, that seems like a great feature to have, so If you manage to implement the feature, Feel free to create a PR, Thanks!
@anuraagdjain commented on GitHub (Jan 6, 2024):
Are we looking to import
conversations.jsonfrom OpenAI's data export?@MaKraMc commented on GitHub (Jan 6, 2024):
Yes, that was what I was referring to. I actually did a comparison between both conversations.json from OpenAI and an export from Ollama Webui and they look quite similar. I think a few JSON mappings could do the trick but I'm no expert on that topic.
@bhulston commented on GitHub (Jan 13, 2024):
@anuraagdjain Are you already working on this? If not I'm happy to tackle this one
@anuraagdjain commented on GitHub (Jan 13, 2024):
I planned to, but you can take this. Could you please tag me in your PR? I'd like to just view it 🙏
@bhulston commented on GitHub (Jan 13, 2024):
@MaKraMc Did you try importing the ollama-web-ui export as well? Just checking if that worked okay for you (on my end it didn't so I'm gna double check that code as well)
@MaKraMc commented on GitHub (Jan 13, 2024):
You are right. After importing the history from ollama webui itself, the titles are there but the chats can not be loaded. When clicking on an imported chat, I see the JSON object of the chat followed by an error message:
@bhulston commented on GitHub (Jan 13, 2024):
Yah I got the same issue, just wanted to make sure it wasn't just me. Thanks for checking. 🤟
Looks like a simple import issue?, but probably gta run some tests. I've also started on parsing GPT responses so I'll keep you updated!
@justinh-rahb commented on GitHub (Jan 13, 2024):
Exports generated by the migration to user authentication imported fine, but exports generated since then have been unimportable, I've experienced the same as the rest of you. Titles show, but no content in chats is visible.
@bhulston commented on GitHub (Jan 16, 2024):
https://github.com/ollama-webui/ollama-webui/pull/486
Added a PR to fix chat imports for ollama-webui exports. Once this goes through, will add changes to correctly format OpenAI export to match ollama-webui one and it should be good 👍
Imported chat working successfully above^
@madman2012 commented on GitHub (Jan 16, 2024):
I cannot get the import of chats to work from either openai json or ollama's. Hopefully it gets fixed soon!
@bhulston commented on GitHub (Jan 17, 2024):
@madman2012
You would likely have to pull the GitHub updates into your docket from the new merge for ollama ones to work
Working on the OpenAI one and hoping to be done tonight
Here is how you can do it easily from your CLI:
docker pull ghcr.io/ollama-webui/ollama-webui:main- Make sure this is the name of your image in your container!
docker stop ollama-webuidocker rm ollama-webui- This will stop and delete your old container (make sure name is correct)
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v ollama-webui:/app/backend/data --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main- Same command when you first setup ollama-webui in the docs!
Maybe you already knew this but in case others see it.
@bhulston commented on GitHub (Jan 17, 2024):
Added a PR for this issue! Once it goes through, importing chat histories should work well!
Oops: Noticed that when selecting new models for the imported chats, it isn't saved between refreshes so need to fix that first.
Edit: This is fixed now:)
https://github.com/ollama-webui/ollama-webui/pull/498