mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[PR #486] [MERGED] Fix/chat imports #7145
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/486
Author: @bhulston
Created: 1/16/2024
Status: ✅ Merged
Merged: 1/16/2024
Merged by: @tjbck
Base:
main← Head:fix/chat-imports📝 Commits (2)
3b7775aFix chat import bug4b3acfaRemove console logs📊 Changes
2 files changed (+3 additions, -3 deletions)
View changed files
📝
src/lib/components/chat/SettingsModal.svelte(+1 -1)📝
src/routes/(app)/c/[id]/+page.svelte(+2 -2)📄 Description
Relating to this issue: https://github.com/ollama-webui/ollama-webui/issues/337
It seems like chat imports are not working for ollama in general. The fix for this was pretty simple:
insert_new_chatmethoda. Instead we send chat.chat, also called chatContent elsewhere in the repo, which matches the dict structure used when creating brand new chats.
** Note **: Maybe we should just create a new class method for importing chats to use in the importChats function in SettingsModal.svelte? As of now, we lose all original information from imports since it uses the
insert_new_chatmethod from herebackend/apps/web/models/chats.py, when instead, we could directly import the original chat id and chat user id and timestamp. But this is a very small QOL difference.a. Model was not loading on import because key is
models, notmodel, so I fixed that too.a. page.svelte was missing a function for converting messages to history.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.