mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
Merge pull request #12414 from dotmobo/feature/fix-timestamp-granularities
The parameter timestamp_granularities is broken for openai-like transcription
This commit is contained in:
commit
351896cd1d
3 changed files with 4 additions and 0 deletions
|
|
@ -2437,6 +2437,7 @@ def get_optional_params_transcription(
|
|||
"prompt": None,
|
||||
"response_format": None,
|
||||
"temperature": None, # openai defaults this to 0
|
||||
"timestamp_granularities": None
|
||||
}
|
||||
|
||||
non_default_params = {
|
||||
|
|
|
|||
|
|
@ -451,6 +451,8 @@ class TestOpenAIGPT4OAudioTranscription(BaseLLMAudioTranscriptionTest):
|
|||
def get_base_audio_transcription_call_args(self) -> dict:
|
||||
return {
|
||||
"model": "openai/gpt-4o-transcribe",
|
||||
"response_format": "verbose_json",
|
||||
"timestamp_granularities": ["word"],
|
||||
}
|
||||
|
||||
def get_custom_llm_provider(self) -> litellm.LlmProviders:
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ async def test_transcription(
|
|||
api_key=api_key,
|
||||
api_base=api_base,
|
||||
response_format=response_format,
|
||||
timestamp_granularities=timestamp_granularities,
|
||||
drop_params=True,
|
||||
)
|
||||
print(f"transcript: {transcript.model_dump()}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue