perf: search prompt, upload step and psw len

This commit is contained in:
archer
2023-08-10 11:49:32 +08:00
parent 9ea19b8eaa
commit 63c832d883
14 changed files with 113 additions and 58 deletions

View File

@@ -142,7 +142,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
// subsection import
let success = 0;
const step = 100;
const step = 500;
for (let i = 0; i < chunks.length; i += step) {
const { insertLen } = await postKbDataFromList({
kbId,

View File

@@ -13,7 +13,7 @@ import { TrainingModeEnum } from '@/constants/plugin';
import FileSelect from './FileSelect';
import { useRouter } from 'next/router';
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz1234567890', 12);
import { fileDownload, readCsvContent } from '@/utils/file';
import { readCsvContent } from '@/utils/file';
const fileExtension = '.csv';
@@ -98,7 +98,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
// subsection import
let success = 0;
const step = 100;
const step = 500;
for (let i = 0; i < chunks.length; i += step) {
const { insertLen } = await postKbDataFromList({
kbId,

View File

@@ -132,7 +132,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
// subsection import
let success = 0;
const step = 100;
const step = 500;
for (let i = 0; i < chunks.length; i += step) {
const { insertLen } = await postKbDataFromList({
kbId,