Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

handle Azure rate limit errors for test_transcription

Ishaan Jaff6e6cd05f69c5
diff --git a/tests/local_testing/test_whisper.py b/tests/local_testing/test_whisper.py
index 1d7b7408746..1e4d421bb3c 100644
--- a/tests/local_testing/test_whisper.py
+++ b/tests/local_testing/test_whisper.py
@@ -55,30 +55,18 @@ from litellm import Router
"response_format, timestamp_granularities",
[("json", None), ("vtt", None), ("verbose_json", ["word"])],
)
[email protected]("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}")