소스 검색

fix: API Key Authorization Configuration Model Form render default value (#24963)

tags/1.8.1
17hz 2 달 전
부모
커밋
d6b3df8f6f
No account linked to committer's email address
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5
    2
      web/app/components/header/account-setting/model-provider-page/model-auth/hooks/use-model-form-schemas.ts

+ 5
- 2
web/app/components/header/account-setting/model-provider-page/model-auth/hooks/use-model-form-schemas.ts 파일 보기

@@ -65,7 +65,10 @@ export const useModelFormSchemas = (
}, [formSchemas, t])

const formValues = useMemo(() => {
let result = {}
let result: any = {}
formSchemas.forEach((schema) => {
result[schema.variable] = schema.default
})
if (credential) {
result = { ...result, __authorization_name__: credential?.credential_name }
if (credentials)
@@ -74,7 +77,7 @@ export const useModelFormSchemas = (
if (model)
result = { ...result, __model_name: model?.model, __model_type: model?.model_type }
return result
}, [credentials, credential, model])
}, [credentials, credential, model, formSchemas])

return {
formSchemas: formSchemasWithAuthorizationName,

Loading…
취소
저장