fix the problem config_list_from_dotenv() can't correctly get other p… (#2172)

* fix the problem config_list_from_dotenv() can't correctly get other params

* Update openai_utils.py

---------

Co-authored-by: Aaron <aaronlaptop12@hotmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
This commit is contained in:
Wannabeasmartguy 2024-03-30 09:24:10 +08:00 committed by GitHub
parent 061a857b3d
commit 6ed8f696ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -541,11 +541,11 @@ def get_config(
"""
config = {"api_key": api_key}
if base_url:
config["base_url"] = base_url
config["base_url"] = os.getenv(base_url, default=base_url)
if api_type:
config["api_type"] = api_type
config["api_type"] = os.getenv(api_type, default=api_type)
if api_version:
config["api_version"] = api_version
config["api_version"] = os.getenv(api_version, default=api_version)
return config