Unverified Commit 3a5c7c75 authored by zxhlyh's avatar zxhlyh Committed by GitHub

Fix/model selector (#1032)

parent a7415ecf
......@@ -89,7 +89,7 @@ export const StatusItem: FC<{
<Tooltip
selector='dataset-document-detail-item-status'
htmlContent={
<div className='max-w-[260px]'>{errorMessage}</div>
<div className='max-w-[260px] break-all'>{errorMessage}</div>
}
>
<HelpCircle className='ml-1 w-[14px] h-[14px] text-gray-700' />
......
......@@ -122,6 +122,7 @@ const ModelPage = () => {
const handleUpdateProvidersAndModelList = () => {
updateModelList(ModelType.textGeneration)
updateModelList(ModelType.embeddings)
updateModelList(ModelType.speech2text)
mutateProviders()
}
const handleSave = async (originValue?: FormValue) => {
......
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment