mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-23 10:46:12 +01:00
⬇️ fix: JSON LibreChat Imports (#2897)
* chore: remove unused code * refactor: Update NewChatButtonIcon component to use JSX syntax The NewChatButtonIcon component in the Nav folder has been updated to use JSX syntax instead of calling the Icon function directly. This change improves code readability and maintainability. * remove use memo * refactor: allow passing `select` to messages db query * fix: initial fix for non-recursive messages * ci: first pass, importers test rewrite * fix(groupConversationsByDate): handle edge case of conversation.updatedAt being null * fix: correctly handle non-recursive uploads * feat: imports non-recursive conversations with branches correctly * feat: support retaining original options on import * refactor: Allow `messageTree` field for Import of non-recursive conversations
This commit is contained in:
parent
c9e7d4ac18
commit
3f600f0d3f
13 changed files with 516 additions and 175 deletions
|
|
@ -19,7 +19,7 @@
|
|||
"endpoint": "openAI",
|
||||
"title": "VW Transporter 2014 Fuel Consumption. Web Search"
|
||||
},
|
||||
"messagesTree": [
|
||||
"messages": [
|
||||
{
|
||||
"_id": "6615516574dc2ddcdebe40b6",
|
||||
"messageId": "b123942f-ca1a-4b16-9e1f-ea4af5171168",
|
||||
|
|
|
|||
40
api/server/utils/import/__data__/librechat-linear.json
Normal file
40
api/server/utils/import/__data__/librechat-linear.json
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"conversationId": "4c9e1402-f746-479d-8a18-2dfab1bf750f",
|
||||
"endpoint": "azureOpenAI",
|
||||
"title": "Adventure Across Time and Space",
|
||||
"exportAt": "20:33:31 GMT-0400 (Eastern Daylight Time)",
|
||||
"branches": false,
|
||||
"recursive": false,
|
||||
"messages": [
|
||||
{
|
||||
"messageId": "ed3fdaaa-e174-4d70-89a9-b06e70939723",
|
||||
"conversationId": "4c9e1402-f746-479d-8a18-2dfab1bf750f",
|
||||
"createdAt": "2024-05-29T00:33:03.661Z",
|
||||
"endpoint": "azureOpenAI",
|
||||
"error": false,
|
||||
"isCreatedByUser": true,
|
||||
"isEdited": false,
|
||||
"model": null,
|
||||
"parentMessageId": null,
|
||||
"sender": "user",
|
||||
"text": "tell me a long story",
|
||||
"unfinished": false,
|
||||
"updatedAt": "2024-05-29T00:33:03.661Z"
|
||||
},
|
||||
{
|
||||
"messageId": "113b8336-4b19-4f91-8eed-741b3dc2940e",
|
||||
"conversationId": "4c9e1402-f746-479d-8a18-2dfab1bf750f",
|
||||
"createdAt": "2024-05-29T00:33:03.661Z",
|
||||
"endpoint": "azureOpenAI",
|
||||
"error": false,
|
||||
"isCreatedByUser": false,
|
||||
"isEdited": false,
|
||||
"model": "gpt-4o",
|
||||
"parentMessageId": "ed3fdaaa-e174-4d70-89a9-b06e70939723",
|
||||
"sender": "GPT-4",
|
||||
"text": "Of course! Here’s a detailed and engaging story:\n\n---\n\n### The Legend of Eldoria\n\nNestled between towering mountains and dense, ancient forests was the enigmatic kingdom of Eldoria. This realm, clo aked in perpetual twilight, was the stuff of legends. It was said that the land was blessed by the gods and guarded by mythical creatures. Eldoria was a place where magic and realism intertwined seamlessly, creating a land of beauty, wonder, and peril.\n\nIn the heart of this kingdom lay the grand city of Lumina, known",
|
||||
"unfinished": false,
|
||||
"updatedAt": "2024-05-29T00:33:03.661Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
"conversationId": "27b593be-9500-479c-94cb-050cab8f5033",
|
||||
"endpoint": "azureOpenAI",
|
||||
"title": "Original",
|
||||
"exportAt": "08:12:16 GMT-0400 (Eastern Daylight Time)",
|
||||
"branches": true,
|
||||
"recursive": false,
|
||||
"options": {
|
||||
"presetId": null,
|
||||
"model": "gpt-4o",
|
||||
"chatGptLabel": null,
|
||||
"promptPrefix": null,
|
||||
"temperature": 1,
|
||||
"top_p": 1,
|
||||
"presence_penalty": 0,
|
||||
"frequency_penalty": 0,
|
||||
"resendFiles": true,
|
||||
"imageDetail": "auto",
|
||||
"endpoint": "azureOpenAI",
|
||||
"title": "Original"
|
||||
},
|
||||
"messages": [
|
||||
{
|
||||
"messageId": "115a6247-8fb0-4937-a536-12956669098d",
|
||||
"conversationId": "27b593be-9500-479c-94cb-050cab8f5033",
|
||||
"createdAt": "2024-05-28T18:08:55.014Z",
|
||||
"endpoint": "azureOpenAI",
|
||||
"error": false,
|
||||
"isCreatedByUser": true,
|
||||
"isEdited": false,
|
||||
"model": null,
|
||||
"parentMessageId": "00000000-0000-0000-0000-000000000000",
|
||||
"sender": "User",
|
||||
"text": "tell me a long story",
|
||||
"tokenCount": 9,
|
||||
"unfinished": false,
|
||||
"updatedAt": "2024-05-28T18:09:27.193Z"
|
||||
},
|
||||
{
|
||||
"messageId": "069b9c22-7649-45a9-b90b-fc050533ea21",
|
||||
"conversationId": "27b593be-9500-479c-94cb-050cab8f5033",
|
||||
"createdAt": "2024-05-28T18:08:55.390Z",
|
||||
"error": false,
|
||||
"isCreatedByUser": false,
|
||||
"isEdited": false,
|
||||
"model": "gpt-4o",
|
||||
"parentMessageId": "115a6247-8fb0-4937-a536-12956669098d",
|
||||
"sender": "GPT-4",
|
||||
"text": "Of course! Settle in for a tale of adventure across time and space.\n\n---\n\nOnce upon a time in the small, sleepy village of Eldoria, there was a young woman named Elara who longed for adventure. Eldoria was a place of routine and simplicity, nestled between rolling hills and dense forests, but Elara always felt that there was more to the world than the boundaries",
|
||||
"unfinished": false,
|
||||
"updatedAt": "2024-05-28T18:08:58.669Z",
|
||||
"endpoint": "azureOpenAI",
|
||||
"tokenCount": 78,
|
||||
"finish_reason": "incomplete"
|
||||
},
|
||||
{
|
||||
"messageId": "303e4c2c-f03e-4e0a-8551-c96ec73be5fe",
|
||||
"conversationId": "27b593be-9500-479c-94cb-050cab8f5033",
|
||||
"createdAt": "2024-05-28T18:09:27.444Z",
|
||||
"error": false,
|
||||
"isCreatedByUser": false,
|
||||
"isEdited": false,
|
||||
"model": "gpt-4o",
|
||||
"parentMessageId": "115a6247-8fb0-4937-a536-12956669098d",
|
||||
"sender": "GPT-4",
|
||||
"text": "Sure, I can craft a long story for you. Here it goes:\n\n### The Chronicles of Elenor: The Luminary of Anduril\n\nIn an age long forgotten by men, in a world kissed by the glow of dual suns, the Kingdom of Anduril flourished. Verdant valleys graced its land, majestic mountains shielded",
|
||||
"unfinished": true,
|
||||
"updatedAt": "2024-05-28T18:09:30.448Z"
|
||||
},
|
||||
{
|
||||
"messageId": "599e1908-8c52-4a73-ba6b-f6dffbd79ba0",
|
||||
"conversationId": "27b593be-9500-479c-94cb-050cab8f5033",
|
||||
"createdAt": "2024-05-28T18:14:07.988Z",
|
||||
"endpoint": "azureOpenAI",
|
||||
"error": false,
|
||||
"isCreatedByUser": true,
|
||||
"isEdited": false,
|
||||
"model": null,
|
||||
"parentMessageId": "00000000-0000-0000-0000-000000000000",
|
||||
"sender": "User",
|
||||
"text": "tell me a long long story",
|
||||
"tokenCount": 9,
|
||||
"unfinished": false,
|
||||
"updatedAt": "2024-05-28T18:14:07.988Z"
|
||||
},
|
||||
{
|
||||
"messageId": "de9a4e7c-020d-4856-a5a6-ce6794efef99",
|
||||
"conversationId": "27b593be-9500-479c-94cb-050cab8f5033",
|
||||
"createdAt": "2024-05-28T18:14:08.403Z",
|
||||
"error": false,
|
||||
"isCreatedByUser": false,
|
||||
"isEdited": true,
|
||||
"model": "gpt-4o",
|
||||
"parentMessageId": "599e1908-8c52-4a73-ba6b-f6dffbd79ba0",
|
||||
"sender": "GPT-4",
|
||||
"text": "Of course! Here’s a detailed and engaging story:\n\n---\n\n### The Legend of Eldoria\n\nNestled between towering mountains and dense, ancient forests was the enigmatic kingdom of Eldoria. This realm, clo aked in perpetual twilight, was the stuff of legends. It was said that the land was blessed by the gods and guarded by mythical creatures. Eldoria was a place where magic and realism intertwined seamlessly, creating a land of beauty, wonder, and peril.\n\nIn the heart of this kingdom lay the grand city of Lumina, known",
|
||||
"unfinished": false,
|
||||
"updatedAt": "2024-05-28T18:14:20.349Z",
|
||||
"endpoint": "azureOpenAI",
|
||||
"finish_reason": "incomplete",
|
||||
"tokenCount": 110
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
"endpoint": "openAI",
|
||||
"title": "Troubleshooting Python Virtual Environment Activation Issue"
|
||||
},
|
||||
"messagesTree": [
|
||||
"messages": [
|
||||
{
|
||||
"_id": "66326f3f04bed94b7f5be68d",
|
||||
"messageId": "9501f99d-9bbb-40cb-bbb2-16d79aeceb72",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue