mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? fix: fetch llm list by @tanstack/react-query #1306 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -22,7 +22,6 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useDispatch } from 'umi';
|
||||
import { useSetModalState, useTranslate } from './common-hooks';
|
||||
import { useSetDocumentParser } from './document-hooks';
|
||||
import { useFetchLlmList } from './llm-hooks';
|
||||
import { useSetPaginationParams } from './route-hook';
|
||||
import { useOneNamespaceEffectsLoading } from './store-hooks';
|
||||
import {
|
||||
@ -346,13 +345,3 @@ export const useFetchModelId = (visible: boolean) => {
|
||||
|
||||
return tenantInfo?.llm_id ?? '';
|
||||
};
|
||||
|
||||
export const useFetchLlmModelOnVisible = (visible: boolean) => {
|
||||
const fetchLlmList = useFetchLlmList();
|
||||
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
fetchLlmList();
|
||||
}
|
||||
}, [fetchLlmList, visible]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user