Refactor map_openai_params call in transformation.py

This commit is contained in:
Esteban Zeller 2026-02-24 12:31:53 -03:00 • committed by GitHub
parent 9554dcec8c
commit 8ac5f4a6bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,6 +138,15 @@ class GradientAIConfig(OpenAILikeChatConfig):
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: