Files
nexusAI/packages/shared/src/utils.js
2026-04-07 01:30:35 -07:00

13 lines
323 B
JavaScript

function parseRow(row) {
if (!row) return null;
return {
...row,
metadata: row.metadata ? JSON.parse(row.metadata) : null
};
}
function formatEpisodeText(userMessage, aiResponse) {
return `User: ${userMessage}\nAssistant: ${aiResponse}`;
}
module.exports = { parseRow, formatEpisodeText };