forked from phoenix/litellm-mirror
fix linting
This commit is contained in:
parent
a5a0773b19
commit
14dc7b3b54
3 changed files with 4 additions and 2 deletions
|
@ -65,7 +65,9 @@ class OpenAIO1Config(OpenAIConfig):
|
||||||
param for param in all_openai_params if param not in non_supported_params
|
param for param in all_openai_params if param not in non_supported_params
|
||||||
]
|
]
|
||||||
|
|
||||||
def map_openai_params(self, non_default_params: dict, optional_params: dict):
|
def map_openai_params(
|
||||||
|
self, non_default_params: dict, optional_params: dict, model: str
|
||||||
|
):
|
||||||
for param, value in non_default_params.items():
|
for param, value in non_default_params.items():
|
||||||
if param == "max_tokens":
|
if param == "max_tokens":
|
||||||
optional_params["max_completion_tokens"] = value
|
optional_params["max_completion_tokens"] = value
|
||||||
|
|
|
@ -573,6 +573,7 @@ class OpenAIConfig:
|
||||||
return litellm.OpenAIO1Config().map_openai_params(
|
return litellm.OpenAIO1Config().map_openai_params(
|
||||||
non_default_params=non_default_params,
|
non_default_params=non_default_params,
|
||||||
optional_params=optional_params,
|
optional_params=optional_params,
|
||||||
|
model=model,
|
||||||
)
|
)
|
||||||
supported_openai_params = self.get_supported_openai_params(model)
|
supported_openai_params = self.get_supported_openai_params(model)
|
||||||
for param, value in non_default_params.items():
|
for param, value in non_default_params.items():
|
||||||
|
|
|
@ -50,4 +50,3 @@ async def test_o1_handle_system_role(respx_mock: MockRouter):
|
||||||
|
|
||||||
print(f"response: {response}")
|
print(f"response: {response}")
|
||||||
assert isinstance(response, ModelResponse)
|
assert isinstance(response, ModelResponse)
|
||||||
assert response.choices[0].message.content == "Mocked response"
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue