mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 10:14:26 +00:00
Merge eec4f3bda7
into b82af5b826
This commit is contained in:
commit
e8259aff95
1 changed files with 6 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue