feat: rag csv support

This commit is contained in:
Timothy J. Baek 2024-01-07 09:05:52 -08:00
parent d6a1bf1406
commit d4b2578f6e
2 changed files with 11 additions and 6 deletions

View file

@ -122,9 +122,8 @@
const file = inputFiles[0];
if (['image/gif', 'image/jpeg', 'image/png'].includes(file['type'])) {
reader.readAsDataURL(file);
} else if (['application/pdf', 'text/plain'].includes(file['type'])) {
} else if (['application/pdf', 'text/plain', 'text/csv'].includes(file['type'])) {
console.log(file);
// const hash = (await calculateSHA256(file)).substring(0, 63);
const res = await uploadDocToVectorDB(localStorage.token, '', file);
if (res) {
@ -241,9 +240,8 @@
const file = inputFiles[0];
if (['image/gif', 'image/jpeg', 'image/png'].includes(file['type'])) {
reader.readAsDataURL(file);
} else if (['application/pdf', 'text/plain'].includes(file['type'])) {
} else if (['application/pdf', 'text/plain', 'text/csv'].includes(file['type'])) {
console.log(file);
// const hash = (await calculateSHA256(file)).substring(0, 63);
const res = await uploadDocToVectorDB(localStorage.token, '', file);
if (res) {