forked from phoenix/litellm-mirror
build(openai_proxy/utils.py): fix docker build issues
This commit is contained in:
parent
810298743c
commit
b288db52fc
1 changed files with 7 additions and 4 deletions
|
@ -47,11 +47,14 @@ def load_router_config(router: Optional[litellm.Router]):
|
||||||
config = {}
|
config = {}
|
||||||
config_file = '/app/config.yaml'
|
config_file = '/app/config.yaml'
|
||||||
|
|
||||||
|
try:
|
||||||
if os.path.exists(config_file):
|
if os.path.exists(config_file):
|
||||||
with open(config_file, 'r') as file:
|
with open(config_file, 'r') as file:
|
||||||
config = yaml.safe_load(file)
|
config = yaml.safe_load(file)
|
||||||
else:
|
else:
|
||||||
print(f"Config file '{config_file}' not found.")
|
print(f"Config file '{config_file}' not found.")
|
||||||
|
except:
|
||||||
|
print(f"Config file '{config_file}' not found.")
|
||||||
|
|
||||||
## MODEL LIST
|
## MODEL LIST
|
||||||
model_list = config.get('model_list', None)
|
model_list = config.get('model_list', None)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue