Skip to content

Commit

Permalink
fix: 修复模型key未进行加密
Browse files Browse the repository at this point in the history
  • Loading branch information
shaohuzhang1 committed Oct 17, 2024
1 parent d6915f8 commit 73121a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje
return True

def encryption_dict(self, model: Dict[str, object]):
return model
return {**model, 'dashscope_api_key': super().encryption(model.get('dashscope_api_key', ''))}

dashscope_api_key = forms.PasswordInputField('API Key', required=True)
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje
return True

def encryption_dict(self, model: Dict[str, object]):
return model
return {**model, 'dashscope_api_key': super().encryption(model.get('dashscope_api_key', ''))}

dashscope_api_key = forms.PasswordInputField('API Key', required=True)
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje
return True

def encryption_dict(self, model: Dict[str, object]):
return model
return {**model, 'spark_api_secret': super().encryption(model.get('spark_api_secret', ''))}

base_url = forms.TextInputField('API 域名', required=True, default_value="https://emb-cn-huabei-1.xf-yun.com/")
spark_app_id = forms.TextInputField('APP ID', required=True)
Expand Down

0 comments on commit 73121a0

Please sign in to comment.