feat: max token
This commit is contained in:
parent
48908106af
commit
ce47c96b9f
@ -88,7 +88,7 @@ export async function pushDataToKb({
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const modeMaxToken = {
|
const modeMaxToken = {
|
||||||
[TrainingModeEnum.index]: vectorModel.maxToken,
|
[TrainingModeEnum.index]: vectorModel.maxToken * 1.5,
|
||||||
[TrainingModeEnum.qa]: global.qaModel.maxToken * 0.8
|
[TrainingModeEnum.qa]: global.qaModel.maxToken * 0.8
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -146,7 +146,6 @@ export async function pushDataToKb({
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
error;
|
|
||||||
}
|
}
|
||||||
return Promise.resolve(data);
|
return Promise.resolve(data);
|
||||||
})
|
})
|
||||||
|
|||||||
@ -42,7 +42,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
|
|||||||
.flat()
|
.flat()
|
||||||
.filter((item) => item?.q);
|
.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) {
|
if (filterChunks.length !== chunks.length) {
|
||||||
toast({
|
toast({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user