This commit is contained in:
nobuo kawasaki 2025-04-24 01:07:01 -07:00 committed by GitHub
commit e8259aff95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1104,6 +1104,12 @@ def completion( # type: ignore # noqa: PLR0915
if dynamic_api_key is not None:
api_key = dynamic_api_key
if api_key is None:
# Priority order
# 1. dynamic_api_key of get_llm_provider()
# 2. api_key of Parameters
# 3. model_api_key of get_api_key()
api_key = model_api_key
# check if user passed in any of the OpenAI optional params
optional_params = get_optional_params(
functions=functions,