mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-19 18:19:21 +00:00
handle Azure rate limit errors for test_transcription
This commit is contained in:
@@ -55,30 +55,18 @@ from litellm import Router
|
||||
"response_format, timestamp_granularities",
|
||||
[("json", None), ("vtt", None), ("verbose_json", ["word"])],
|
||||
)
|
||||
@pytest.mark.parametrize("sync_mode", [True, False])
|
||||
@pytest.mark.asyncio
|
||||
async def test_transcription(
|
||||
model, api_key, api_base, response_format, sync_mode, timestamp_granularities
|
||||
):
|
||||
if sync_mode:
|
||||
transcript = litellm.transcription(
|
||||
model=model,
|
||||
file=audio_file,
|
||||
api_key=api_key,
|
||||
api_base=api_base,
|
||||
response_format=response_format,
|
||||
timestamp_granularities=timestamp_granularities,
|
||||
drop_params=True,
|
||||
)
|
||||
else:
|
||||
transcript = await litellm.atranscription(
|
||||
model=model,
|
||||
file=audio_file,
|
||||
api_key=api_key,
|
||||
api_base=api_base,
|
||||
response_format=response_format,
|
||||
drop_params=True,
|
||||
)
|
||||
transcript = await litellm.atranscription(
|
||||
model=model,
|
||||
file=audio_file,
|
||||
api_key=api_key,
|
||||
api_base=api_base,
|
||||
response_format=response_format,
|
||||
drop_params=True,
|
||||
)
|
||||
print(f"transcript: {transcript.model_dump()}")
|
||||
print(f"transcript: {transcript._hidden_params}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user