From b288db52fca8663287ab039ceaacea575133cb0e Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 25 Oct 2023 13:39:39 -0700 Subject: [PATCH] build(openai_proxy/utils.py): fix docker build issues --- openai_proxy/utils.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/openai_proxy/utils.py b/openai_proxy/utils.py index be2ac3275..73864b8c2 100644 --- a/openai_proxy/utils.py +++ b/openai_proxy/utils.py @@ -47,10 +47,13 @@ def load_router_config(router: Optional[litellm.Router]): config = {} config_file = '/app/config.yaml' - if os.path.exists(config_file): - with open(config_file, 'r') as file: - config = yaml.safe_load(file) - else: + try: + if os.path.exists(config_file): + with open(config_file, 'r') as file: + config = yaml.safe_load(file) + else: + print(f"Config file '{config_file}' not found.") + except: print(f"Config file '{config_file}' not found.") ## MODEL LIST