Improve ModelTypeEnum type (#3051)

This commit is contained in:
Nanguan Lin
2024-04-04 15:54:59 +08:00
committed by GitHub
parent e4f686deb7
commit 718ac3f83b
15 changed files with 47 additions and 44 deletions

View File

@@ -3,6 +3,7 @@ import type { FC } from 'react'
import React, { useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import Toast from '../../base/toast'
import { ModelTypeEnum } from '../../header/account-setting/model-provider-page/declarations'
import { XClose } from '@/app/components/base/icons/src/vender/line/general'
import type { RetrievalConfig } from '@/types/app'
import RetrievalMethodConfig from '@/app/components/datasets/common/retrieval-method-config'
@@ -39,7 +40,7 @@ const ModifyRetrievalModal: FC<Props> = ({
modelList: rerankModelList,
defaultModel: rerankDefaultModel,
currentModel: isRerankDefaultModelVaild,
} = useModelListAndDefaultModelAndCurrentProviderAndModel(3)
} = useModelListAndDefaultModelAndCurrentProviderAndModel(ModelTypeEnum.rerank)
const handleSave = () => {
if (