forked from open-webui/open-webui
feat: rag md support
This commit is contained in:
parent
358f79f533
commit
c1ec604f21
4 changed files with 22 additions and 1 deletions
|
@ -149,9 +149,13 @@
|
|||
|
||||
if (inputFiles && inputFiles.length > 0) {
|
||||
const file = inputFiles[0];
|
||||
console.log(file, file.name.split('.').at(-1));
|
||||
if (['image/gif', 'image/jpeg', 'image/png'].includes(file['type'])) {
|
||||
reader.readAsDataURL(file);
|
||||
} else if (SUPPORTED_FILE_TYPE.includes(file['type'])) {
|
||||
} else if (
|
||||
SUPPORTED_FILE_TYPE.includes(file['type']) ||
|
||||
['md'].includes(file.name.split('.').at(-1))
|
||||
) {
|
||||
uploadDoc(file);
|
||||
} else {
|
||||
toast.error(`Unsupported File Type '${file['type']}'.`);
|
||||
|
|
|
@ -14,6 +14,7 @@ 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'
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue