[Frontend] Generalize v1/audio/transcriptions endpoint (#20179)

Signed-off-by: NickLucche <nlucches@redhat.com>
This commit is contained in:
Nicolò Lucchesi
2025-06-28 08:15:26 -07:00
committed by GitHub
parent 8615d9776f
commit daceac57c7
3 changed files with 154 additions and 128 deletions
+11
View File
@@ -599,6 +599,17 @@ class SupportsTranscription(Protocol):
supports_transcription: ClassVar[Literal[True]] = True
@classmethod
def get_decoder_prompt(cls, language: str, task_type: str,
prompt: str) -> str:
"""Get the decoder prompt for the ASR model."""
...
@classmethod
def validate_language(cls, language: str) -> bool:
"""Check if the model supports a specific ISO639_1 language."""
...
@overload
def supports_transcription(