[PR #496] [CLOSED] Feat: Enable imports of ChatGPT chat history #91390

Closed
opened 2026-05-15 16:43:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/496
Author: @bhulston
Created: 1/17/2024
Status: Closed

Base: mainHead: fix/chat-imports


📝 Commits (2)

  • 27d5eb4 Add chatGPT chat history Import functionality
  • 415777e Add error catching for import

📊 Changes

3 files changed (+77 additions, -2 deletions)

View changed files

📝 src/lib/components/chat/SettingsModal.svelte (+8 -1)
📝 src/lib/utils/index.ts (+68 -0)
📝 src/routes/(app)/c/[id]/+page.svelte (+1 -1)

📄 Description

For this issue: https://github.com/ollama-webui/ollama-webui/issues/337

Enable imports of ChatGPT histories (conversations.json), and the ability to choose a new model to use upon import.

  1. Added several functions to src/lib/utils/index.ts that are used at import time before sending to the createNewChat api
    a) 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
  2. Adjusted the "disabled" tag for model selector element at src/routes/(app)/c/[id]/+page.svelte
    a) This makes sure that we can select a new model to chat with when a model is not currently selected (upon import)

** Note **: When we import from ChatGPT, we don't default to a model so 1. users aren't forced to use chatgpt and 2. because actually collecting which chatGPT model was used is not clear from the chatgpt json.
Does not import context (i.e. pdf RAG) info from GPT chats. Maybe would be nice in future but would take some investment.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/496 **Author:** [@bhulston](https://github.com/bhulston) **Created:** 1/17/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/chat-imports` --- ### 📝 Commits (2) - [`27d5eb4`](https://github.com/open-webui/open-webui/commit/27d5eb46847f71e0ec15c437c1064b950fca32fe) Add chatGPT chat history Import functionality - [`415777e`](https://github.com/open-webui/open-webui/commit/415777eca2f7fafef84aa7922bfc553cbe8acbe7) Add error catching for import ### 📊 Changes **3 files changed** (+77 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/SettingsModal.svelte` (+8 -1) 📝 `src/lib/utils/index.ts` (+68 -0) 📝 `src/routes/(app)/c/[id]/+page.svelte` (+1 -1) </details> ### 📄 Description For this issue: https://github.com/ollama-webui/ollama-webui/issues/337 Enable imports of ChatGPT histories (conversations.json), and the ability to choose a new model to use upon import. 1. Added several functions to `src/lib/utils/index.ts` that are used at import time before sending to the `createNewChat` api a) 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 2. Adjusted the "disabled" tag for model selector element at `src/routes/(app)/c/[id]/+page.svelte` a) This makes sure that we can select a new model to chat with when a model is not currently selected (upon import) ** Note **: When we import from ChatGPT, we don't default to a model so 1. users aren't forced to use chatgpt and 2. because actually collecting which chatGPT model was used is not clear from the chatgpt json. Does not import context (i.e. pdf RAG) info from GPT chats. Maybe would be nice in future but would take some investment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-15 16:43:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#91390