Преглед изворни кода

fix: edit load balancing not pass id (#8370)

tags/0.8.3
Joel пре 1 година
родитељ
комит
9d80d7def7
No account linked to committer's email address

+ 1
- 0
web/app/components/header/account-setting/model-provider-page/model-modal/model-load-balancing-entry-modal.tsx Прегледај датотеку

...value, ...value,
...getSecretValues(value), ...getSecretValues(value),
}, },
entry?.id,
) )
if (res.status === ValidatedStatus.Success) { if (res.status === ValidatedStatus.Success) {
// notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') }) // notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })

+ 2
- 2
web/app/components/header/account-setting/model-provider-page/utils.ts Прегледај датотеку

} }
} }


export const validateLoadBalancingCredentials = async (predefined: boolean, provider: string, v: FormValue): Promise<{
export const validateLoadBalancingCredentials = async (predefined: boolean, provider: string, v: FormValue, id?: string): Promise<{
status: ValidatedStatus status: ValidatedStatus
message?: string message?: string
}> => { }> => {
const { __model_name, __model_type, ...credentials } = v const { __model_name, __model_type, ...credentials } = v
try { try {
const res = await validateModelLoadBalancingCredentials({ const res = await validateModelLoadBalancingCredentials({
url: `/workspaces/current/model-providers/${provider}/models/load-balancing-configs/credentials-validate`,
url: `/workspaces/current/model-providers/${provider}/models/load-balancing-configs/${id ? `${id}/` : ''}credentials-validate`,
body: { body: {
model: __model_name, model: __model_name,
model_type: __model_type, model_type: __model_type,

Loading…
Откажи
Сачувај