mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
fix(proxy): correct placement of response_format check in audio_transcriptions
This commit is contained in:
parent
14613f8b2f
commit
21cb1cdd65
1 changed files with 4 additions and 4 deletions
|
|
@ -9643,10 +9643,6 @@ async def embeddings(
|
|||
version=version,
|
||||
)
|
||||
|
||||
if data.get("response_format") in ("text", "srt", "vtt"):
|
||||
from fastapi.responses import Response as FastAPIResponse
|
||||
return FastAPIResponse(content=response.text, media_type="text/plain")
|
||||
|
||||
return response
|
||||
except Exception as e:
|
||||
# Use unified error handler
|
||||
|
|
@ -10055,6 +10051,10 @@ async def audio_transcriptions(
|
|||
if callback_headers:
|
||||
fastapi_response.headers.update(callback_headers)
|
||||
|
||||
if data.get("response_format") in ("text", "srt", "vtt"):
|
||||
from fastapi.responses import Response as FastAPIResponse
|
||||
return FastAPIResponse(content=response.text, media_type="text/plain")
|
||||
|
||||
return response
|
||||
except Exception as e:
|
||||
await proxy_logging_obj.post_call_failure_hook(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue