From b49ef913a8f380585ceb47ebe01dc0341d0ab85a Mon Sep 17 00:00:00 2001 From: Reinier van der Leer Date: Fri, 21 Apr 2023 05:15:39 +0200 Subject: [PATCH] Make `load_azure_config` throw if `azure.yaml` does not exist --- autogpt/config/config.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/autogpt/config/config.py b/autogpt/config/config.py index 80551514..be741fb3 100644 --- a/autogpt/config/config.py +++ b/autogpt/config/config.py @@ -174,11 +174,8 @@ class Config(metaclass=Singleton): Returns: None """ - try: - with open(config_file) as file: - config_params = yaml.load(file, Loader=yaml.FullLoader) - except FileNotFoundError: - config_params = {} + with open(config_file) as file: + config_params = yaml.load(file, Loader=yaml.FullLoader) self.openai_api_type = config_params.get("azure_api_type") or "azure" self.openai_api_base = config_params.get("azure_api_base") or "" self.openai_api_version = (