Fix: Prevent model selection modal from appearing for LM Studio provider

When using the LM Studio provider, the model selection modal was incorrectly appearing. This commit prevents the modal from appearing when the provider is set to LM Studio. This ensures that the user experience is consistent across all providers.
This commit is contained in:
n4ze3m 2024-10-12 19:28:08 +05:30
parent ddb8993f17
commit 1300945b75

View File

@ -35,9 +35,12 @@ export const OpenAIApp = () => {
})
setOpen(false)
message.success(t("addSuccess"))
if (provider !== "lmstudio") {
setOpenaiId(data)
setOpenModelModal(true)
}
setProvider("custom")
}
})
const updateMutation = useMutation({
@ -75,8 +78,6 @@ export const OpenAIApp = () => {
provider
})
}
setProvider("custom")
}
const handleEdit = (record: any) => {