LibreChat/api/lib/utils/misc.js

16 lines
354 B
JavaScript
Raw Permalink Normal View History

const cleanUpPrimaryKeyValue = (value) => {
// For Bing convoId handling
2023-03-24 18:26:59 -04:00
return value.replace(/--/g, '|');
2023-03-22 16:31:57 -04:00
};
function replaceSup(text) {
if (!text.includes('<sup>')) return text;
const replacedText = text.replace(/<sup>/g, '^').replace(/\s+<\/sup>/g, '^');
return replacedText;
}
module.exports = {
cleanUpPrimaryKeyValue,
2023-03-22 16:31:57 -04:00
replaceSup
};