mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-24 10:27: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:
@@ -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()}")
|
||||
|
||||
Reference in New Issue
Block a user