fix: graph rag model id

This commit is contained in:
kangfenmao 2024-08-17 21:54:26 +08:00
parent 3ccebb503f
commit e8dac28787

View File

@ -13,7 +13,7 @@ interface Props {
const GraphRAGSettings: FC<Props> = ({ provider }) => {
const apiUrl = provider.apiHost
const modalId = provider.models[0].id
const modalId = provider.models.filter((model) => model.id.includes('global'))[0]?.id
const { t } = useTranslation()
const onShowGraphRAG = async () => {
@ -22,6 +22,10 @@ const GraphRAGSettings: FC<Props> = ({ provider }) => {
MinApp.start({ url, title: t('words.knowledgeGraph') })
}
if (!modalId) {
return null
}
return (
<Container>
<SettingSubtitle>{t('words.knowledgeGraph')}</SettingSubtitle>