Skip to content

Commit

Permalink
refactor: import content part object json string
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-avila committed May 2, 2024
1 parent 00c54e1 commit 8be339a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/server/utils/import/importers.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,15 @@ function processConversation(conv, importBatchBuilder, requestUserId) {
if (typeof part === 'string') {
messageText += part + ' ';
} else if (typeof part === 'object') {
continue;
messageText = `\`\`\`json
${JSON.stringify(part, null, 2)}
\`\`\``;
}
}
messageText = messageText.trim();
} else {
messageText = `\`\`\`json
${JSON.stringify(mapping.message.content, null, 2)}
${JSON.stringify(mapping.message.content, null, 2)}
\`\`\``;
}

Expand Down

0 comments on commit 8be339a

Please sign in to comment.