mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
fix(main.py): accepting azure deployment_id
This commit is contained in:
parent
523c540051
commit
249cde3d40
3 changed files with 8 additions and 8 deletions
|
@ -1363,7 +1363,6 @@ def get_optional_params( # use the openai defaults
|
|||
frequency_penalty=0,
|
||||
logit_bias={},
|
||||
user="",
|
||||
deployment_id=None,
|
||||
model=None,
|
||||
custom_llm_provider="",
|
||||
**kwargs
|
||||
|
@ -1386,7 +1385,6 @@ def get_optional_params( # use the openai defaults
|
|||
"frequency_penalty":None,
|
||||
"logit_bias":{},
|
||||
"user":"",
|
||||
"deployment_id":None,
|
||||
"model":None,
|
||||
"custom_llm_provider":"",
|
||||
}
|
||||
|
@ -1762,7 +1760,7 @@ def get_optional_params( # use the openai defaults
|
|||
if stream:
|
||||
optional_params["stream"] = stream
|
||||
elif custom_llm_provider == "deepinfra":
|
||||
supported_params = ["temperature", "top_p", "n", "stream", "stop", "max_tokens", "presence_penalty", "frequency_penalty", "logit_bias", "user", "deployment_id"]
|
||||
supported_params = ["temperature", "top_p", "n", "stream", "stop", "max_tokens", "presence_penalty", "frequency_penalty", "logit_bias", "user"]
|
||||
_check_valid_arg(supported_params=supported_params)
|
||||
optional_params = non_default_params
|
||||
if temperature != None:
|
||||
|
@ -1770,7 +1768,7 @@ def get_optional_params( # use the openai defaults
|
|||
temperature = 0.0001 # close to 0
|
||||
optional_params["temperature"] = temperature
|
||||
else: # assume passing in params for openai/azure openai
|
||||
supported_params = ["functions", "function_call", "temperature", "top_p", "n", "stream", "stop", "max_tokens", "presence_penalty", "frequency_penalty", "logit_bias", "user", "deployment_id"]
|
||||
supported_params = ["functions", "function_call", "temperature", "top_p", "n", "stream", "stop", "max_tokens", "presence_penalty", "frequency_penalty", "logit_bias", "user"]
|
||||
_check_valid_arg(supported_params=supported_params)
|
||||
optional_params = non_default_params
|
||||
# if user passed in non-default kwargs for specific providers/models, pass them along
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue