mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
feat(azure/gpt_transformation.py): add azure audio model support
Closes https://github.com/BerriAI/litellm/issues/6305
This commit is contained in:
parent
ef1bde153e
commit
fe24b9d90b
3 changed files with 14 additions and 0 deletions
|
@ -99,6 +99,8 @@ class AzureOpenAIConfig(BaseConfig):
|
|||
"extra_headers",
|
||||
"parallel_tool_calls",
|
||||
"prediction",
|
||||
"modalities",
|
||||
"audio",
|
||||
]
|
||||
|
||||
def _is_response_format_supported_model(self, model: str) -> bool:
|
||||
|
|
|
@ -125,6 +125,7 @@ class OpenAIGPTConfig(BaseLLMModelInfo, BaseConfig):
|
|||
"max_retries",
|
||||
"extra_headers",
|
||||
"parallel_tool_calls",
|
||||
"audio",
|
||||
] # works across all models
|
||||
|
||||
model_specific_params = []
|
||||
|
|
|
@ -1368,3 +1368,14 @@ def test_bedrock_invoke_anthropic_max_tokens():
|
|||
|
||||
assert "max_tokens_to_sample" not in optional_params
|
||||
assert optional_params["max_tokens"] == 1024
|
||||
|
||||
|
||||
def test_azure_modalities_param():
|
||||
optional_params = get_optional_params(
|
||||
model="chatgpt-v2",
|
||||
custom_llm_provider="azure",
|
||||
modalities=["text", "audio"],
|
||||
audio={"type": "audio_input", "input": "test.wav"},
|
||||
)
|
||||
assert optional_params["modalities"] == ["text", "audio"]
|
||||
assert optional_params["audio"] == {"type": "audio_input", "input": "test.wav"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue