diff --git a/superagi/config/config.py b/superagi/config/config.py index 90a35f51a..a8a09a354 100644 --- a/superagi/config/config.py +++ b/superagi/config/config.py @@ -14,8 +14,11 @@ def load_config(cls, config_file: str) -> dict: env_vars = dict(os.environ) # Read config file - with open(config_file, 'r') as file: - config_data = yaml.safe_load(file) + try: + with open(config_file, 'r') as file: + config_data = yaml.safe_load(file) + except FileNotFoundError: + config_data = {} # Merge environment variables and config data config_data = {**config_data, **env_vars}