Import Open WebUI conversations into LibreChat
- In Open WebUI, download your chats (Your name → Chats → Export Chats)
- Using
jq
, run the following command against the chat-export-*.json
file:
jq '[.[] | {
title: .title,
create_time: .created_at,
update_time: .updated_at,
mapping: (.chat.history.messages | to_entries | map({
key: .value.id,
value: {
id: .value.id,
message: {
id: .value.id,
author: {
role: .value.role,
name: null,
metadata: {}
},
create_time: (.value.timestamp | tostring),
update_time: null,
content: {
content_type: "text",
parts: [.value.content]
},
status: "finished_successfully",
end_turn: true,
weight: 1.0,
metadata: {},
recipient: "all",
channel: null
},
parent: .value.parentId,
children: (.value.childrenIds // [])
}
}) | from_entries),
moderation_results: [],
current_node: .chat.currentId,
conversation_id: .id,
id: .id
}]' chat-export-*.json > converted.json
- In LibreChat, click your name and visit Settings → Data controls → Import, and upload
converted.json
.