소스 검색

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 파일 보기

@@ -214,6 +214,7 @@ const ModelLoadBalancingEntryModal: FC<ModelModalProps> = ({
...value,
...getSecretValues(value),
},
entry?.id,
)
if (res.status === ValidatedStatus.Success) {
// notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })

+ 2
- 2
web/app/components/header/account-setting/model-provider-page/utils.ts 파일 보기

@@ -56,14 +56,14 @@ export const validateCredentials = async (predefined: boolean, provider: string,
}
}

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
message?: string
}> => {
const { __model_name, __model_type, ...credentials } = v
try {
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: {
model: __model_name,
model_type: __model_type,

Loading…
취소
저장