mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
@@ -106,7 +106,7 @@ export const useApiDatasetRequest = ({ apiServer }: { apiServer: APIFileServer }
|
||||
|
||||
const formattedFiles = files.map((file) => ({
|
||||
...file,
|
||||
hasChild: file.type === 'folder'
|
||||
hasChild: file.hasChild ?? file.type === 'folder'
|
||||
}));
|
||||
|
||||
return formattedFiles;
|
||||
|
@@ -198,6 +198,7 @@ export const useYuqueDatasetRequest = ({ yuqueServer }: { yuqueServer: YuqueServ
|
||||
}: {
|
||||
apiFileId: string;
|
||||
}): Promise<ApiFileReadContentResponse> => {
|
||||
if (typeof apiFileId !== 'string') return Promise.reject('Invalid file id');
|
||||
const [parentId, fileId] = apiFileId.split(/-(.*?)-(.*)/);
|
||||
|
||||
const data = await request<{ title: string; body: string }>(
|
||||
|
@@ -167,7 +167,7 @@ export const readApiServerFileContent = async ({
|
||||
};
|
||||
|
||||
export const rawText2Chunks = async ({
|
||||
rawText,
|
||||
rawText = '',
|
||||
chunkTriggerType = ChunkTriggerConfigTypeEnum.minSize,
|
||||
chunkTriggerMinSize = 1000,
|
||||
backupParse,
|
||||
|
Reference in New Issue
Block a user