diff --git a/tests/llm_translation/test_gpt4o_audio.py b/tests/llm_translation/test_gpt4o_audio.py index f41dabb6665..1b6d35484ba 100644 --- a/tests/llm_translation/test_gpt4o_audio.py +++ b/tests/llm_translation/test_gpt4o_audio.py @@ -34,6 +34,8 @@ async def check_streaming_response(completion): _audio_id = None async for chunk in completion: print(chunk) + if not chunk.choices: # skip usage-only chunks (choices=[]) + continue _choice: StreamingChoices = chunk.choices[0] if _choice.delta.audio is not None: if _choice.delta.audio.get("data") is not None: @@ -84,7 +86,7 @@ async def test_audio_output_from_model(stream): @pytest.mark.asyncio @pytest.mark.parametrize("stream", [True, False]) -@pytest.mark.parametrize("model", ["gpt-4o-audio-preview"]) # "gpt-4o-audio-preview", +@pytest.mark.parametrize("model", ["gpt-4o-audio-preview"]) # "gpt-4o-audio-preview", async def test_audio_input_to_model(stream, model): # Fetch the audio file and convert it to a base64 encoded string audio_format = "pcm16"