mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 10:14:26 +00:00
fix(main.py): use model_api_key determined from get_api_key
This commit is contained in:
parent
918367cc7b
commit
eec4f3bda7
1 changed files with 6 additions and 0 deletions
|
@ -775,6 +775,12 @@ def completion(
|
|||
|
||||
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