feat: add usage to TranscriptionResponse (text and json response_format) (#23576)

Signed-off-by: Guillaume Calmettes <gcalmettes@scaleway.com>
This commit is contained in:
Guillaume Calmettes
2025-08-26 14:26:26 +02:00
committed by GitHub
parent 384dd1b0a8
commit ebd5a77bb5
3 changed files with 32 additions and 5 deletions

View File

@ -2232,9 +2232,15 @@ class TranscriptionRequest(OpenAIBaseModel):
# Transcription response objects
class TranscriptionUsageAudio(OpenAIBaseModel):
type: Literal["duration"] = "duration"
seconds: int
class TranscriptionResponse(OpenAIBaseModel):
text: str
"""The transcribed text."""
usage: TranscriptionUsageAudio
class TranscriptionWord(OpenAIBaseModel):