Revert "sub plan page (#885)" (#886)

This reverts commit 443ad37b6a.
This commit is contained in:
Archer
2024-02-23 17:48:15 +08:00
committed by GitHub
parent 443ad37b6a
commit fd9b6291af
246 changed files with 4281 additions and 6286 deletions

View File

@@ -12,7 +12,7 @@ import {
import { defaultDatasetDetail } from '@/constants/dataset';
import type { DatasetUpdateBody } from '@fastgpt/global/core/dataset/api.d';
import { DatasetStatusEnum } from '@fastgpt/global/core/dataset/constants';
import { postCreateTrainingUsage } from '@/web/support/wallet/usage/api';
import { postCreateTrainingBill } from '@/web/support/wallet/bill/api';
import { checkTeamWebSyncLimit } from '@/web/support/user/team/api';
type State = {
@@ -89,17 +89,19 @@ export const useDatasetStore = create<State>()(
async startWebsiteSync() {
await checkTeamWebSyncLimit();
const billId = await postCreateTrainingUsage({
name: 'core.dataset.training.Website Sync',
datasetId: get().datasetDetail._id
});
return postWebsiteSync({ datasetId: get().datasetDetail._id, billId }).then(() => {
const [_, billId] = await Promise.all([
get().updateDataset({
id: get().datasetDetail._id,
status: DatasetStatusEnum.syncing
});
});
}),
postCreateTrainingBill({
name: 'core.dataset.training.Website Sync',
datasetId: get().datasetDetail._id
})
]);
try {
postWebsiteSync({ datasetId: get().datasetDetail._id, billId });
} catch (error) {}
}
})),
{

View File

@@ -68,6 +68,12 @@ export async function chunksUpload({
});
}
// add chunk index
chunks = chunks.map((chunk) => ({
...chunk,
chunkIndex: chunk.chunkIndex
}));
let successInsert = 0;
let retryTimes = 10;
for (let i = 0; i < chunks.length; i += rate) {