mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-19 15:04:26 +01:00
Make load_azure_config throw if azure.yaml does not exist
This commit is contained in:
@@ -174,11 +174,8 @@ class Config(metaclass=Singleton):
|
|||||||
Returns:
|
Returns:
|
||||||
None
|
None
|
||||||
"""
|
"""
|
||||||
try:
|
with open(config_file) as file:
|
||||||
with open(config_file) as file:
|
config_params = yaml.load(file, Loader=yaml.FullLoader)
|
||||||
config_params = yaml.load(file, Loader=yaml.FullLoader)
|
|
||||||
except FileNotFoundError:
|
|
||||||
config_params = {}
|
|
||||||
self.openai_api_type = config_params.get("azure_api_type") or "azure"
|
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_base = config_params.get("azure_api_base") or ""
|
||||||
self.openai_api_version = (
|
self.openai_api_version = (
|
||||||
|
|||||||
Reference in New Issue
Block a user