Add repetition_penalty parameter to transcription endpoint

This commit is contained in:
2024-07-11 21:48:46 +08:00
parent 931b578899
commit e8ae8bf9c5

View File

@@ -297,6 +297,7 @@ async def transcription(
task: str = Form("transcribe"),
language: str = Form("und"),
vad_filter: bool = Form(False),
repetition_penalty: float = Form(1.0),
):
"""Transcription endpoint
@@ -309,6 +310,7 @@ async def transcription(
task=task,
vad_filter=vad_filter,
language=None if language == "und" else language,
repetition_penalty=repetition_penalty,
)
# special function for streaming response (OpenAI API does not have this)