🔒 chore(llms.py): set password field to False for fields not containing 'key' or 'token' in their name
The openai_api_version field value is no longer set as it is not needed. The password field is now set to False for fields not containing 'key' or 'token' in their name to improve security.
🐛 fix(llms.py): remove setting of openai_api_version field value
This commit is contained in:
parent
39926381f1
commit
61a6710adf
1 changed files with 3 additions and 1 deletions
|
|
@ -12,6 +12,9 @@ class LLMFrontendNode(FrontendNode):
|
|||
field.name.title().replace("Openai", "OpenAI").replace("_", " ")
|
||||
).replace("Api", "API")
|
||||
|
||||
if "key" not in field.name.lower() and "token" not in field.name.lower():
|
||||
field.password = False
|
||||
|
||||
@staticmethod
|
||||
def format_azure_field(field: TemplateField):
|
||||
if field.name == "model_name":
|
||||
|
|
@ -22,7 +25,6 @@ class LLMFrontendNode(FrontendNode):
|
|||
field.value = "azure"
|
||||
elif field.name == "openai_api_version":
|
||||
field.password = False
|
||||
field.value = "2023-03-15-preview"
|
||||
|
||||
@staticmethod
|
||||
def format_llama_field(field: TemplateField):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue