feat: max token

This commit is contained in:
archer 2023-09-10 11:52:54 +08:00
parent 48908106af
commit ce47c96b9f
No known key found for this signature in database
GPG Key ID: 569A5660D2379E28
2 changed files with 2 additions and 3 deletions

View File

@ -88,7 +88,7 @@ export async function pushDataToKb({
]);
const modeMaxToken = {
[TrainingModeEnum.index]: vectorModel.maxToken,
[TrainingModeEnum.index]: vectorModel.maxToken * 1.5,
[TrainingModeEnum.qa]: global.qaModel.maxToken * 0.8
};
@ -146,7 +146,6 @@ export async function pushDataToKb({
}
} catch (error) {
console.log(error);
error;
}
return Promise.resolve(data);
})

View File

@ -42,7 +42,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
.flat()
.filter((item) => item?.q);
const filterChunks = chunks.filter((item) => item.q.length < maxToken);
const filterChunks = chunks.filter((item) => item.q.length < maxToken * 1.5);
if (filterChunks.length !== chunks.length) {
toast({