diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx index e60ef418edf628..376a08c1207f8e 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/parameter-item.tsx @@ -127,12 +127,10 @@ const ParameterItem: FC = ({ && !isNullOrUndefined(parameterRule.min) && !isNullOrUndefined(parameterRule.max) - if (parameterRule.type === 'int' || parameterRule.type === 'float') { + if (parameterRule.type === 'int') { let step = 100 if (parameterRule.max) { - if (parameterRule.max < 10) - step = 0.1 - else if (parameterRule.max < 100) + if (parameterRule.max < 100) step = 1 else if (parameterRule.max < 1000) step = 10 @@ -164,6 +162,31 @@ const ParameterItem: FC = ({ ) } + if (parameterRule.type === 'float') { + return ( + <> + {numberInputWithSlide && } + + + ) + } + if (parameterRule.type === 'boolean') { return (