Skip to content

Commit

Permalink
fix: system test case media input file non existent
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 691524603
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed Oct 30, 2024
1 parent 23cac8a commit c0718e1
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/system/vertexai/test_generative_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,19 +414,17 @@ def test_generate_content_from_text_and_remote_video(
def test_generate_content_from_text_and_remote_audio(
self, api_endpoint_env_name, api_transport
):
vision_model = generative_models.GenerativeModel(GEMINI_15_PRO_2_MODEL_NAME)
pro_model = generative_models.GenerativeModel(GEMINI_15_PRO_2_MODEL_NAME)
audio_part = generative_models.Part.from_uri(
uri="gs://cloud-samples-data/audio/speech_16k.wav",
mime_type="audio/wav",
uri="gs://cloud-samples-data/generative-ai/audio/pixel.mp3",
mime_type="audio/mp3",
)
response = vision_model.generate_content(
response = pro_model.generate_content(
contents=["What is in the audio?", audio_part],
generation_config=generative_models.GenerationConfig(audio_timestamp=True),
)
assert response.text
assert api_transport in get_client_api_transport(
vision_model._prediction_client
)
assert api_transport in get_client_api_transport(pro_model._prediction_client)

def test_grounding_google_search_retriever(self, api_endpoint_env_name):
model = preview_generative_models.GenerativeModel(GEMINI_MODEL_NAME)
Expand Down

0 comments on commit c0718e1

Please sign in to comment.