mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-02 18:45:29 +08:00
### What problem does this PR solve? feat: Supports chatting with files/images #1880 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { SupportedPreviewDocumentTypes } from '@/constants/common';
|
||||
import { Images, SupportedPreviewDocumentTypes } from '@/constants/common';
|
||||
import { IChunk } from '@/interfaces/database/knowledge';
|
||||
import { UploadFile } from 'antd';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
@ -51,3 +51,7 @@ export const getUnSupportedFilesCount = (message: string) => {
|
||||
export const isSupportedPreviewDocumentType = (fileExtension: string) => {
|
||||
return SupportedPreviewDocumentTypes.includes(fileExtension);
|
||||
};
|
||||
|
||||
export const isImage = (image: string) => {
|
||||
return [...Images, 'svg'].some((x) => x === image);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user