feat: model load balancing (#4926)
This commit is contained in:
parent
d1dbbc1e33
commit
37f292ea91
58 changed files with 1896 additions and 304 deletions
|
|
@ -86,7 +86,7 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
|
|||
isInWorkflow,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const { hasSettedApiKey } = useProviderContext()
|
||||
const { isAPIKeySet } = useProviderContext()
|
||||
const [open, setOpen] = useState(false)
|
||||
const { data: parameterRulesData, isLoading } = useSWR((provider && modelId) ? `/workspaces/current/model-providers/${provider}/models/parameter-rules?model=${modelId}` : null, fetchModelParameterRules)
|
||||
const {
|
||||
|
|
@ -99,7 +99,7 @@ const ModelParameterModal: FC<ModelParameterModalProps> = ({
|
|||
|
||||
const hasDeprecated = !currentProvider || !currentModel
|
||||
const modelDisabled = currentModel?.status !== ModelStatusEnum.active
|
||||
const disabled = !hasSettedApiKey || hasDeprecated || modelDisabled
|
||||
const disabled = !isAPIKeySet || hasDeprecated || modelDisabled
|
||||
|
||||
const parameterRules: ModelParameterRule[] = useMemo(() => {
|
||||
return parameterRulesData?.data || []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue