update text splitter (#3020)

This commit is contained in:
Archer
2024-10-30 01:10:35 +08:00
committed by GitHub
parent ee718750e2
commit 8e4084f7ee
12 changed files with 83 additions and 72 deletions

View File

@@ -54,7 +54,6 @@ async function handler(
}
);
dataLength += data.matchedCount;
console.log(data.matchedCount, '=-=-');
// 插入数据进入训练库
const max = global.systemEnv?.vectorMaxProcess || 10;

View File

@@ -3,7 +3,7 @@ import { rawText2Chunks, readDatasetSourceRawText } from '@fastgpt/service/core/
import { authCert } from '@fastgpt/service/support/permission/auth/common';
import { NextAPI } from '@/service/middleware/entry';
import { ApiRequestProps } from '@fastgpt/service/type/next';
import { OwnerPermissionVal, ReadPermissionVal } from '@fastgpt/global/support/permission/constant';
import { OwnerPermissionVal } from '@fastgpt/global/support/permission/constant';
import { authFile } from '@fastgpt/service/support/permission/auth/file';
export type PostPreviewFilesChunksProps = {
@@ -60,6 +60,6 @@ async function handler(
overlapRatio,
customReg: customSplitChar ? [customSplitChar] : [],
isQAImport: isQAImport
}).slice(0, 5);
}).slice(0, 15);
}
export default NextAPI(handler);

View File

@@ -111,7 +111,6 @@ export const useSpeech = (props?: OutLinkChatAuthProps & { appId?: string }) =>
const blob = new Blob(chunks, options);
const duration = Math.round((Date.now() - startTimestamp.current) / 1000);
console.log(options, filename, '=-=-');
formData.append('file', blob, filename);
formData.append(
'data',

View File

@@ -27,7 +27,7 @@
"fastify": "^4.27.0",
"dayjs": "^1.11.7",
"isolated-vm": "^4.7.2",
"tiktoken": "^1.0.15",
"tiktoken": "1.0.17",
"node-gyp": "^10.1.0",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1"