build(openai_proxy/utils.py): fix docker build issues

This commit is contained in:
Krrish Dholakia 2023-10-25 13:39:39 -07:00
parent 810298743c
commit b288db52fc

View file

@ -47,10 +47,13 @@ def load_router_config(router: Optional[litellm.Router]):
config = {} config = {}
config_file = '/app/config.yaml' config_file = '/app/config.yaml'
if os.path.exists(config_file): try:
with open(config_file, 'r') as file: if os.path.exists(config_file):
config = yaml.safe_load(file) with open(config_file, 'r') as file:
else: config = yaml.safe_load(file)
else:
print(f"Config file '{config_file}' not found.")
except:
print(f"Config file '{config_file}' not found.") print(f"Config file '{config_file}' not found.")
## MODEL LIST ## MODEL LIST