mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00

* feat: think tag parse * feat: parse think tag test * feat: pdf parse ux * feat: doc2x parse * perf: rewrite training mode setting * feat: image parse queue * perf: image index * feat: image parse process * feat: add init sh * fix: ts
19 lines
612 B
TypeScript
19 lines
612 B
TypeScript
import { DatasetCollectionTypeEnum } from '../constants';
|
|
import { DatasetCollectionSchemaType } from '../type';
|
|
|
|
export const getCollectionSourceData = (collection?: DatasetCollectionSchemaType) => {
|
|
return {
|
|
sourceId:
|
|
collection?.fileId ||
|
|
collection?.rawLink ||
|
|
collection?.externalFileId ||
|
|
collection?.externalFileUrl ||
|
|
collection?.apiFileId,
|
|
sourceName: collection?.name || ''
|
|
};
|
|
};
|
|
|
|
export const checkCollectionIsFolder = (type: DatasetCollectionTypeEnum) => {
|
|
return type === DatasetCollectionTypeEnum.folder || type === DatasetCollectionTypeEnum.virtual;
|
|
};
|