forked from open-webui/open-webui
feat: rag csv support
This commit is contained in:
parent
d6a1bf1406
commit
d4b2578f6e
2 changed files with 11 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue