mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
Merge pull request #524 from Marclass/rag-arbitrary-files
feat: Allow RAG on XML and arbitrary text files including source code
This commit is contained in:
@@ -173,7 +173,8 @@
|
||||
) {
|
||||
uploadDoc(file);
|
||||
} else {
|
||||
toast.error(`Unsupported File Type '${file['type']}'.`);
|
||||
toast.error(`Unknown File Type '${file['type']}', but accepting and treating as plain text`);
|
||||
uploadDoc(file);
|
||||
}
|
||||
} else {
|
||||
toast.error(`File not found.`);
|
||||
@@ -308,8 +309,9 @@
|
||||
uploadDoc(file);
|
||||
filesInputElement.value = '';
|
||||
} else {
|
||||
toast.error(`Unsupported File Type '${file['type']}'.`);
|
||||
inputFiles = null;
|
||||
toast.error(`Unknown File Type '${file['type']}', but accepting and treating as plain text`);
|
||||
uploadDoc(file);
|
||||
filesInputElement.value = '';
|
||||
}
|
||||
} else {
|
||||
toast.error(`File not found.`);
|
||||
|
||||
@@ -13,10 +13,15 @@ export const REQUIRED_OLLAMA_VERSION = '0.1.16';
|
||||
|
||||
export const SUPPORTED_FILE_TYPE = [
|
||||
'application/pdf',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'text/markdown',
|
||||
'text/plain',
|
||||
'text/csv'
|
||||
'text/csv',
|
||||
'text/xml',
|
||||
'text/x-python',
|
||||
'text/css',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/octet-stream',
|
||||
'application/x-javascript',
|
||||
'text/markdown',
|
||||
];
|
||||
|
||||
// Source: https://kit.svelte.dev/docs/modules#$env-static-public
|
||||
|
||||
@@ -73,7 +73,8 @@
|
||||
) {
|
||||
uploadDoc(file);
|
||||
} else {
|
||||
toast.error(`Unsupported File Type '${file['type']}'.`);
|
||||
toast.error(`Unknown File Type '${file['type']}', but accepting and treating as plain text`);
|
||||
uploadDoc(file);
|
||||
}
|
||||
} else {
|
||||
toast.error(`File not found.`);
|
||||
@@ -153,7 +154,8 @@
|
||||
) {
|
||||
uploadDoc(file);
|
||||
} else {
|
||||
toast.error(`Unsupported File Type '${file['type']}'.`);
|
||||
toast.error(`Unknown File Type '${file['type']}', but accepting and treating as plain text`);
|
||||
uploadDoc(file);
|
||||
}
|
||||
|
||||
inputFiles = null;
|
||||
|
||||
Reference in New Issue
Block a user