Fix/model selector (#1032)

This commit is contained in:
zxhlyh
2023-08-28 10:54:41 +08:00
committed by GitHub
parent a7415ecfd8
commit 3a5c7c75ad
3 changed files with 3 additions and 2 deletions

View File

@@ -122,6 +122,7 @@ const ModelPage = () => {
const handleUpdateProvidersAndModelList = () => {
updateModelList(ModelType.textGeneration)
updateModelList(ModelType.embeddings)
updateModelList(ModelType.speech2text)
mutateProviders()
}
const handleSave = async (originValue?: FormValue) => {

View File

@@ -78,7 +78,7 @@ const ModelSelector: FC<Props> = ({
})
: modelList
const hasRemoved = value && !modelList.find(({ model_name }) => model_name === value.modelName)
const hasRemoved = value && !modelList.find(({ model_name, model_provider }) => model_name === value.modelName && model_provider.provider_name === value.providerName)
const modelOptions: ModelOption[] = (() => {
const providers = _.uniq(filteredModelList.map(item => item.model_provider.provider_name))