mirror of https://github.com/langgenius/dify.git
fix: model-credential
This commit is contained in:
parent
56c51f0112
commit
b1859c280f
|
|
@ -86,7 +86,6 @@ const ModelModal: FC<ModelModalProps> = ({
|
|||
} = credentialData as any
|
||||
|
||||
const { isCurrentWorkspaceManager } = useAppContext()
|
||||
const isEditMode = !!formSchemasValue && isCurrentWorkspaceManager
|
||||
const { t } = useTranslation()
|
||||
const language = useLanguage()
|
||||
const {
|
||||
|
|
@ -94,6 +93,9 @@ const ModelModal: FC<ModelModalProps> = ({
|
|||
formValues,
|
||||
} = useModelFormSchemas(provider, providerFormSchemaPredefined, formSchemasValue, credential, model)
|
||||
const formRef = useRef<FormRefObject>(null)
|
||||
const isEditMode = !!Object.keys(formValues).filter((key) => {
|
||||
return key !== '__model_name' && key !== '__model_type'
|
||||
}).length && isCurrentWorkspaceManager
|
||||
|
||||
const handleSave = useCallback(async () => {
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ const ModelLoadBalancingConfigs = ({
|
|||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
<div className='mr-1 text-[13px]'>
|
||||
<div className='mr-1 text-[13px] text-text-secondary'>
|
||||
{isProviderManaged ? t('common.modelProvider.defaultConfig') : config.name}
|
||||
</div>
|
||||
{isProviderManaged && providerFormSchemaPredefined && (
|
||||
|
|
|
|||
Loading…
Reference in New Issue