Skip to content

Commit

Permalink
Merge branch 'main' into warn_if_python_docker_is_na
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyun-wu authored Oct 9, 2023
2 parents 16351ad + d8ebf6c commit 174c1eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autogen/oai/openai_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,12 @@ def config_list_from_json(
if json_str:
config_list = json.loads(json_str)
else:
config_list_path = os.path.join(file_location, env_or_file)
try:
with open(os.path.join(file_location, env_or_file)) as json_file:
with open(config_list_path) as json_file:
config_list = json.load(json_file)
except FileNotFoundError:
logging.warning(f"The specified config_list file '{config_list_path}' does not exist.")
return []
return filter_config(config_list, filter_dict)

Expand Down

0 comments on commit 174c1eb

Please sign in to comment.