balibabu
feat: fetch knowledge detail on KnowledgeUploadFile mount and add category column to chunk table and set initial value for the model field of chat setting (#104)
4086c42
import { | |
useFetchTenantInfo, | |
useSelectTenantInfo, | |
} from '@/hooks/userSettingHook'; | |
import { useEffect } from 'react'; | |
export const useFetchModelId = (visible: boolean) => { | |
const fetchTenantInfo = useFetchTenantInfo(false); | |
const tenantInfo = useSelectTenantInfo(); | |
useEffect(() => { | |
if (visible) { | |
fetchTenantInfo(); | |
} | |
}, [visible, fetchTenantInfo]); | |
return tenantInfo?.llm_id ?? ''; | |
}; | |