mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 05:19:00 +08:00
Fix/model selector (#1032)
This commit is contained in:
parent
a7415ecfd8
commit
3a5c7c75ad
@ -89,7 +89,7 @@ export const StatusItem: FC<{
|
|||||||
<Tooltip
|
<Tooltip
|
||||||
selector='dataset-document-detail-item-status'
|
selector='dataset-document-detail-item-status'
|
||||||
htmlContent={
|
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' />
|
<HelpCircle className='ml-1 w-[14px] h-[14px] text-gray-700' />
|
||||||
|
@ -122,6 +122,7 @@ const ModelPage = () => {
|
|||||||
const handleUpdateProvidersAndModelList = () => {
|
const handleUpdateProvidersAndModelList = () => {
|
||||||
updateModelList(ModelType.textGeneration)
|
updateModelList(ModelType.textGeneration)
|
||||||
updateModelList(ModelType.embeddings)
|
updateModelList(ModelType.embeddings)
|
||||||
|
updateModelList(ModelType.speech2text)
|
||||||
mutateProviders()
|
mutateProviders()
|
||||||
}
|
}
|
||||||
const handleSave = async (originValue?: FormValue) => {
|
const handleSave = async (originValue?: FormValue) => {
|
||||||
|
@ -78,7 +78,7 @@ const ModelSelector: FC<Props> = ({
|
|||||||
})
|
})
|
||||||
: modelList
|
: 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 modelOptions: ModelOption[] = (() => {
|
||||||
const providers = _.uniq(filteredModelList.map(item => item.model_provider.provider_name))
|
const providers = _.uniq(filteredModelList.map(item => item.model_provider.provider_name))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user