diff --git a/nl2dsl/__init__.py b/nl2dsl/__init__.py index e68e690..494f0e6 100644 --- a/nl2dsl/__init__.py +++ b/nl2dsl/__init__.py @@ -181,8 +181,9 @@ def add_azure_keys(self, dsl): "FAST_MODEL", "SLOW_MODEL", ] + existing_keys = set(config_var["name"] for config_var in dsl["config_vars"]) for key in AZURE_CREDENTIALS: - if key not in dsl["config_vars"]: + if key not in existing_keys: dsl["config_vars"].append({"name": key, "value": ""}) return dsl