mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 12:48:30 +00:00
4.8.8 test fix (#2149)
* perf: code comment * feat: system plugin input guide * perf: variable avatar * feat: feishu webhook * perf: select tool config tip * perf: rename variable * fix: per inherit error * perf: docker-compose oneapi version and i18n * perf: ui tip bug * fix: ts * perf: pg log * perf: editor color * perf: update init
This commit is contained in:
@@ -71,7 +71,7 @@ const Test = ({ datasetId }: { datasetId: string }) => {
|
||||
usingReRank: false,
|
||||
limit: 5000,
|
||||
similarity: 0,
|
||||
datasetSearchUsingExtensionQuery: false,
|
||||
datasetSearchUsingExtensionQuery: true,
|
||||
datasetSearchExtensionModel: llmModelList[0].model,
|
||||
datasetSearchExtensionBg: ''
|
||||
}
|
||||
@@ -432,6 +432,7 @@ const TestResults = React.memo(function TestResults({
|
||||
similarity={datasetTestItem.similarity}
|
||||
limit={datasetTestItem.limit}
|
||||
usingReRank={datasetTestItem.usingReRank}
|
||||
datasetSearchUsingExtensionQuery={!!datasetTestItem.queryExtensionModel}
|
||||
queryExtensionModel={datasetTestItem.queryExtensionModel}
|
||||
/>
|
||||
</Box>
|
||||
|
@@ -68,7 +68,11 @@ function DatasetContextProvider({ children }: { children: React.ReactNode }) {
|
||||
|
||||
const { parentId = null } = router.query as { parentId?: string | null };
|
||||
|
||||
const { data: myDatasets = [], runAsync: loadMyDatasets } = useRequest2(
|
||||
const {
|
||||
data: myDatasets = [],
|
||||
runAsync: loadMyDatasets,
|
||||
loading: isFetchingDatasets
|
||||
} = useRequest2(
|
||||
() =>
|
||||
getDatasets({
|
||||
parentId
|
||||
@@ -83,7 +87,7 @@ function DatasetContextProvider({ children }: { children: React.ReactNode }) {
|
||||
() => (parentId ? getDatasetById(parentId) : Promise.resolve(undefined)),
|
||||
{
|
||||
manual: false,
|
||||
refreshDeps: [parentId, myDatasets]
|
||||
refreshDeps: [parentId]
|
||||
}
|
||||
);
|
||||
|
||||
@@ -95,16 +99,8 @@ function DatasetContextProvider({ children }: { children: React.ReactNode }) {
|
||||
}
|
||||
);
|
||||
|
||||
const { runAsync: refetchDatasets, loading: isFetchingDatasets } = useRequest2(
|
||||
() => loadMyDatasets(),
|
||||
{
|
||||
manual: false,
|
||||
refreshDeps: [parentId]
|
||||
}
|
||||
);
|
||||
|
||||
const { runAsync: onUpdateDataset } = useRequest2(putDatasetById, {
|
||||
onSuccess: () => Promise.all([refetchDatasets(), refetchPaths(), loadMyDatasets()])
|
||||
onSuccess: () => Promise.all([refetchFolderDetail(), refetchPaths(), loadMyDatasets()])
|
||||
});
|
||||
|
||||
const onMoveDataset = useCallback(
|
||||
@@ -138,7 +134,6 @@ function DatasetContextProvider({ children }: { children: React.ReactNode }) {
|
||||
});
|
||||
|
||||
const contextValue = {
|
||||
refetchDatasets,
|
||||
isFetchingDatasets,
|
||||
setMoveDatasetId,
|
||||
paths,
|
||||
|
Reference in New Issue
Block a user