mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +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:
@ -38,7 +38,6 @@ export default {
|
||||
knowledge_graph: `${api_host}/chunk/knowledge_graph`,
|
||||
|
||||
// document
|
||||
upload: `${api_host}/document/upload`,
|
||||
get_document_list: `${api_host}/document/list`,
|
||||
document_change_status: `${api_host}/document/change_status`,
|
||||
document_rm: `${api_host}/document/rm`,
|
||||
@ -50,6 +49,7 @@ export default {
|
||||
get_document_file: `${api_host}/document/get`,
|
||||
document_upload: `${api_host}/document/upload`,
|
||||
web_crawl: `${api_host}/document/web_crawl`,
|
||||
document_infos: `${api_host}/document/infos`,
|
||||
|
||||
// chat
|
||||
setDialog: `${api_host}/dialog/set`,
|
||||
|
||||
@ -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