This commit is contained in:
Archer
2023-12-31 14:12:51 +08:00
committed by GitHub
parent ccca0468da
commit 9ccfda47b7
270 changed files with 8182 additions and 1295 deletions

View File

@@ -11,7 +11,12 @@ import type {
DatasetUpdateBody,
PostWebsiteSyncParams
} from '@fastgpt/global/core/dataset/api.d';
import type { SearchTestProps, SearchTestResponse } from '@/global/core/dataset/api.d';
import type {
GetTrainingQueueProps,
GetTrainingQueueResponse,
SearchTestProps,
SearchTestResponse
} from '@/global/core/dataset/api.d';
import type {
PushDatasetDataProps,
UpdateDatasetDataProps,
@@ -107,7 +112,8 @@ export const delOneDatasetDataById = (dataId: string) =>
/* ================ training ==================== */
/* get length of system training queue */
export const getTrainingQueueLen = () => GET<number>(`/core/dataset/training/getQueueLen`);
export const getTrainingQueueLen = (data: GetTrainingQueueProps) =>
GET<GetTrainingQueueResponse>(`/core/dataset/training/getQueueLen`, data);
/* ================== file ======================== */
export const getFileViewUrl = (fileId: string) =>

View File

@@ -2,6 +2,7 @@ import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
import { immer } from 'zustand/middleware/immer';
import type { SearchDataResponseItemType } from '@fastgpt/global/core/dataset/type';
import { DatasetSearchModeEnum } from '@fastgpt/global/core/dataset/constant';
export type SearchTestStoreItemType = {
id: string;
@@ -10,6 +11,7 @@ export type SearchTestStoreItemType = {
time: Date;
duration: string;
results: SearchDataResponseItemType[];
searchMode: `${DatasetSearchModeEnum}`;
};
type State = {