Skip to content

Commit 0a6fed5

Browse files
WannabeasmartguyAaronWardsonichi
authored
fix the problem config_list_from_dotenv() can't correctly get other p… (microsoft#2172)
* fix the problem config_list_from_dotenv() can't correctly get other params * Update openai_utils.py --------- Co-authored-by: Aaron <[email protected]> Co-authored-by: Chi Wang <[email protected]>
1 parent b76410d commit 0a6fed5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autogen/oai/openai_utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,11 @@ def get_config(
541541
"""
542542
config = {"api_key": api_key}
543543
if base_url:
544-
config["base_url"] = base_url
544+
config["base_url"] = os.getenv(base_url, default=base_url)
545545
if api_type:
546-
config["api_type"] = api_type
546+
config["api_type"] = os.getenv(api_type, default=api_type)
547547
if api_version:
548-
config["api_version"] = api_version
548+
config["api_version"] = os.getenv(api_version, default=api_version)
549549
return config
550550

551551

0 commit comments

Comments
 (0)