-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add ChatGPT import functionality #498
Conversation
@tjbck I did a lot of testing in dev environment so there shouldn't be any issues. Original functionality of app stays the same and changes only affect imported chats really 👍 |
Amazing work! LGTM, Thanks! |
Cool! I saw your refactoring, let me know if you want me to do that for you next time I don't mind. Also saw the edge case handling and preferred formatting so I will keep those in mind next time too 👍 |
So, due to migrating my ChatGPT account from Plus to Team, I actually lost the ability to continue my prior chats in my Personal workspace with GPT-4. Now I can import those chats and continue them with API access. 👌 Edit: My Plus subscription finally expired and oddly enough I can still use GPT-4 from my "personal" workspace. Odd, but I ain't gonna question them on that LOL |
@bhulston yeah no worries, thanks for the hard work! |
Thanks for the hard work on this guys. I can import the Ollama chats no problem, and chat contents come. If I import the OpenAI json I see the title of the chats but no contents. Just FYI. |
@madman2012 edit: on my end it works well so lmk:) |
@justinh-rahb |
I've been a daily user of ChatGPT since day 1, my export file is quite large, and I saw some issues with weird characters, and some chats with null titles. It's probable this is simply unclean data and unfortunately the only way I could help you to reproduce that is by sharing my export, which I cannot do. |
All good, my friend just sent me his (also since day1) and it reproduced the same error 👍 I should be able to fix it pretty quick. My guess is we just need to add some try catch blocks and skip the ones with some errors, we'll see |
@justinh-rahb @madman2012 |
Added one more PR: #535 I tested this on chats from 3 separate people and tried to cover 99% of edge cases. Basically just adding one additional step of validation for inputs. Seems there are external tools gpt might use or corrupted json objects from multiple interruptions in the chat. Not happy about the inefficiency of it but imports should really only happen one time... so this should fix any issues you all had. |
You're a superstar @bhulston ! I'll build your branch and give this a try if I can get a few minutes to spare before the end of the day. |
Yah lmk!Trying my best so hopefully this one works, seems like it should work well |
Working great @bhulston! Imports a few of my chats without titles but that's a minor issue I'm more than happy to live with. |
Working here too! Thank you, you are a superstar! |
Feat: Add ChatGPT import functionality
For this issue: #337
Enable imports of ChatGPT histories (conversations.json), and ability to choose a new model upon import.
Added several functions to
src/lib/utils/index.ts
that are used at import before sending tocreateNewChat
apia) Identify if import is a chatGPT one or Ollama-webui one (as they are very different)
b) Parses and iterates through the chatGPT json to match the ollama-webui chat structure
Make sure new chats work with existing code
a) Adjusted the "disabled" tag to let you choose what model to use for new chat
b) Add one more check when message is sent that saves selectedModel when current saved model is different
- With imported models, messages already exist but no model exists! so need to update. or if you import chats using models that you don't have (i.e. 'gpt-3.5-turbo')
** Note **: When we import from ChatGPT, we don't default to a model so users aren't forced to use chatgpt
Does not import context (i.e. pdf RAG) info from GPT chats.