Skip to content

Commit c0718e1

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
fix: system test case media input file non existent
PiperOrigin-RevId: 691524603
1 parent 23cac8a commit c0718e1

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tests/system/vertexai/test_generative_models.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -414,19 +414,17 @@ def test_generate_content_from_text_and_remote_video(
414414
def test_generate_content_from_text_and_remote_audio(
415415
self, api_endpoint_env_name, api_transport
416416
):
417-
vision_model = generative_models.GenerativeModel(GEMINI_15_PRO_2_MODEL_NAME)
417+
pro_model = generative_models.GenerativeModel(GEMINI_15_PRO_2_MODEL_NAME)
418418
audio_part = generative_models.Part.from_uri(
419-
uri="gs://cloud-samples-data/audio/speech_16k.wav",
420-
mime_type="audio/wav",
419+
uri="gs://cloud-samples-data/generative-ai/audio/pixel.mp3",
420+
mime_type="audio/mp3",
421421
)
422-
response = vision_model.generate_content(
422+
response = pro_model.generate_content(
423423
contents=["What is in the audio?", audio_part],
424424
generation_config=generative_models.GenerationConfig(audio_timestamp=True),
425425
)
426426
assert response.text
427-
assert api_transport in get_client_api_transport(
428-
vision_model._prediction_client
429-
)
427+
assert api_transport in get_client_api_transport(pro_model._prediction_client)
430428

431429
def test_grounding_google_search_retriever(self, api_endpoint_env_name):
432430
model = preview_generative_models.GenerativeModel(GEMINI_MODEL_NAME)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy