mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix: serialize boolean provider params as lowercase strings
str(True) produces "True" but Mistral API expects lowercase "true". Use str(value).lower() for bool params in provider-specific fields.
This commit is contained in:
parent
c1d1f72f43
commit
354f44c661
2 changed files with 2 additions and 2 deletions
|
|
@ -121,7 +121,7 @@ class MistralAudioTranscriptionConfig(BaseAudioTranscriptionConfig):
|
|||
openai_params=self.get_supported_openai_params(model),
|
||||
)
|
||||
for key, value in provider_specific_params.items():
|
||||
form_fields[key] = str(value)
|
||||
form_fields[key] = str(value).lower() if isinstance(value, bool) else str(value)
|
||||
|
||||
files = {
|
||||
"file": (
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ def test_mistral_audio_transcription_request_with_diarize():
|
|||
audio_file.close()
|
||||
|
||||
assert isinstance(result.data, dict)
|
||||
assert result.data["diarize"] == "True"
|
||||
assert result.data["diarize"] == "true"
|
||||
|
||||
|
||||
def test_mistral_audio_transcription_response_transform():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue