mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix: normalize content-type header case in whisper transcription fallback
This commit is contained in:
parent
e3d6384e5e
commit
72982e4342
1 changed files with 1 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ class OpenAIWhisperAudioTranscriptionConfig(BaseAudioTranscriptionConfig):
|
||||||
try:
|
try:
|
||||||
raw_response_json = raw_response.json()
|
raw_response_json = raw_response.json()
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
content_type = raw_response.headers.get("content-type", "")
|
content_type = raw_response.headers.get("content-type", "").lower()
|
||||||
if "application/json" in content_type:
|
if "application/json" in content_type:
|
||||||
raise
|
raise
|
||||||
return TranscriptionResponse(text=raw_response.text)
|
return TranscriptionResponse(text=raw_response.text)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue