mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
Remove map_openai_params method
Removed the map_openai_params method from the transformation.py file.
This commit is contained in:
parent
bf874fd7ce
commit
bd8e46df9e
1 changed files with 0 additions and 30 deletions
|
|
@ -129,33 +129,3 @@ class GradientAIConfig(OpenAILikeChatConfig):
|
|||
|
||||
dynamic_api_key = api_key or get_secret_str("GRADIENT_AI_API_KEY")
|
||||
return api_base, dynamic_api_key
|
||||
|
||||
def map_openai_params(
|
||||
self,
|
||||
non_default_params: dict,
|
||||
optional_params: dict,
|
||||
model: str,
|
||||
drop_params: bool = False,
|
||||
replace_max_completion_tokens_with_max_tokens: bool = False,
|
||||
) -> dict:
|
||||
|
||||
optional_params = super().map_openai_params(
|
||||
non_default_params=non_default_params,
|
||||
optional_params=optional_params,
|
||||
model=model,
|
||||
drop_params=drop_params,
|
||||
replace_max_completion_tokens_with_max_tokens=replace_max_completion_tokens_with_max_tokens,
|
||||
)
|
||||
|
||||
supported_openai_params = self.get_supported_openai_params(model=model)
|
||||
for param, value in non_default_params.items():
|
||||
if param in supported_openai_params:
|
||||
optional_params[param] = value
|
||||
elif not drop_params:
|
||||
from litellm.utils import UnsupportedParamsError
|
||||
raise UnsupportedParamsError(
|
||||
status_code=400,
|
||||
message=f"GradientAI does not support parameter '{param}'. To drop unsupported params, set `drop_params=True`."
|
||||
)
|
||||
|
||||
return optional_params
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue