mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
feature/export-import-3 (#4234)
* fix: add ASSISTANT chatflow * feat: add mvp export import for chatMessage, chatFeedback, customTemplate, documentStore * feat: add function to handle duplicate ids during import * chore: typo 'orginalData' to 'originalData' * feat: add import conditions for chatMessage and chatMessageFeedback * feat: reduce spacing before saving chatflows
This commit is contained in:
@@ -57,7 +57,8 @@ const sanitizeAssistant = (Assistant) => {
|
||||
id: assistant.id,
|
||||
details: assistant.details,
|
||||
credential: assistant.credential,
|
||||
iconSrc: assistant.iconSrc
|
||||
iconSrc: assistant.iconSrc,
|
||||
type: assistant.type
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
@@ -76,11 +77,17 @@ export const stringify = (object) => {
|
||||
export const exportData = (exportAllData) => {
|
||||
try {
|
||||
return {
|
||||
Tool: sanitizeTool(exportAllData.Tool),
|
||||
ChatFlow: sanitizeChatflow(exportAllData.ChatFlow),
|
||||
AgentFlow: sanitizeChatflow(exportAllData.AgentFlow),
|
||||
Variable: sanitizeVariable(exportAllData.Variable),
|
||||
Assistant: sanitizeAssistant(exportAllData.Assistant)
|
||||
AssistantFlow: sanitizeChatflow(exportAllData.AssistantFlow),
|
||||
Assistant: sanitizeAssistant(exportAllData.Assistant),
|
||||
ChatFlow: sanitizeChatflow(exportAllData.ChatFlow),
|
||||
ChatMessage: exportAllData.ChatMessage,
|
||||
ChatMessageFeedback: exportAllData.ChatMessageFeedback,
|
||||
CustomTemplate: exportAllData.CustomTemplate,
|
||||
DocumentStore: exportAllData.DocumentStore,
|
||||
DocumentStoreFileChunk: exportAllData.DocumentStoreFileChunk,
|
||||
Tool: sanitizeTool(exportAllData.Tool),
|
||||
Variable: sanitizeVariable(exportAllData.Variable)
|
||||
}
|
||||
} catch (error) {
|
||||
throw new Error(`exportImport.exportData ${getErrorMessage(error)}`)
|
||||
|
||||
Reference in New Issue
Block a user