ai / api /lib /utils /misc.js
Marco Beretta
LibreChat upload repo
3b6afc0
raw
history blame
No virus
365 Bytes
const cleanUpPrimaryKeyValue = (value) => {
// For Bing convoId handling
return value.replace(/--/g, '|');
};
function replaceSup(text) {
if (!text.includes('<sup>')) {
return text;
}
const replacedText = text.replace(/<sup>/g, '^').replace(/\s+<\/sup>/g, '^');
return replacedText;
}
module.exports = {
cleanUpPrimaryKeyValue,
replaceSup,
};