feat: audio rag support

This commit is contained in:
Timothy J. Baek 2024-02-11 01:06:25 -08:00
parent a5b9bbf10b
commit c6c69924d1
3 changed files with 24 additions and 5 deletions

View file

@ -341,3 +341,9 @@ export const extractSentences = (text) => {
.map((sentence) => removeEmojis(sentence.trim()))
.filter((sentence) => sentence !== '');
};
export const blobToFile = (blob, fileName) => {
// Create a new File object from the Blob
const file = new File([blob], fileName, { type: blob.type });
return file;
};