mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
fix: chat metadata wasn't being taken into consideration when cloning a chat
fix: chat metadata wasn't being taken into consideration when cloning a chat
This commit is contained in:
parent
66341124a6
commit
bd570b7e2e
1 changed files with 12 additions and 1 deletions
|
|
@ -617,7 +617,18 @@ async def clone_chat_by_id(
|
|||
"title": form_data.title if form_data.title else f"Clone of {chat.title}",
|
||||
}
|
||||
|
||||
chat = Chats.insert_new_chat(user.id, ChatForm(**{"chat": updated_chat}))
|
||||
chat = Chats.import_chat(
|
||||
user.id,
|
||||
ChatImportForm(
|
||||
**{
|
||||
"chat": updated_chat,
|
||||
"meta": chat.meta,
|
||||
"pinned": chat.pinned,
|
||||
"folder_id": chat.folder_id,
|
||||
}
|
||||
),
|
||||
)
|
||||
|
||||
return ChatResponse(**chat.model_dump())
|
||||
else:
|
||||
raise HTTPException(
|
||||
|
|
|
|||
Loading…
Reference in a new issue