mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
fix(proxy): return text/plain for audio transcriptions when response_format=text/srt/vtt
This commit is contained in:
parent
5a395ef909
commit
14613f8b2f
1 changed files with 4 additions and 0 deletions
|
|
@ -9643,6 +9643,10 @@ 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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue