This commit is contained in:
Dua Fatima 2026-11-02 08:01:05 +01:00 • committed by GitHub
commit 9a7f2943cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13704,6 +13704,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(