Skip to content

Commit d38580d

Browse files
committed
fix the llm behavior to align with previous behavior (for unit tests)
1 parent 929b901 commit d38580d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

opto/utils/llm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def __init__(self, config_list: List = None, filter_dict: Dict = None, reset_fre
5353
config_list = autogen.config_list_from_json("OAI_CONFIG_LIST")
5454
except:
5555
config_list = auto_construct_oai_config_list_from_env()
56-
os.environ.update({"OAI_CONFIG_LIST": json.dumps(config_list)})
56+
if len(config_list) > 0:
57+
os.environ.update({"OAI_CONFIG_LIST": json.dumps(config_list)})
5758
config_list = autogen.config_list_from_json("OAI_CONFIG_LIST")
5859
if filter_dict is not None:
5960
config_list = autogen.filter_config_list(config_list, filter_dict)

0 commit comments

Comments
 (0)