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

* perf: local file create collection * rename middleware * perf: remove code * feat: next14 * feat: external file dataset * collection tags field * external file dataset doc * fix: ts
15 lines
402 B
TypeScript
15 lines
402 B
TypeScript
import { CollectionWithDatasetType, DatasetCollectionSchemaType } from '../type';
|
|
|
|
export const getCollectionSourceData = (
|
|
collection?: CollectionWithDatasetType | DatasetCollectionSchemaType
|
|
) => {
|
|
return {
|
|
sourceId:
|
|
collection?.fileId ||
|
|
collection?.rawLink ||
|
|
collection?.externalFileId ||
|
|
collection?.externalFileUrl,
|
|
sourceName: collection?.name || ''
|
|
};
|
|
};
|