Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: skip failing Gemini grounding test due to allowlist restrictions #11313

Merged
merged 5 commits into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions generative_ai/test_gemini_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import os

import pytest
import vertexai

import gemini_chat_example
Expand All @@ -26,7 +27,6 @@
import gemini_safety_config_example
import gemini_single_turn_video_example


PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")
LOCATION = "us-central1"

Expand Down Expand Up @@ -83,9 +83,10 @@ def test_gemini_count_token_example() -> None:


def test_gemini_safety_config_example() -> None:
import urllib
import typing
import http
import typing
import urllib

from vertexai.preview.generative_models import Image

def load_image_from_url(image_url: str) -> str:
Expand Down Expand Up @@ -132,9 +133,10 @@ def test_gemini_chat_example() -> None:
assert any([_ in text for _ in ("hi", "hello", "greeting")])


@pytest.mark.skip(
"Unable to test Google Search grounding due to allowlist restrictions."
)
def test_gemini_grounding_example() -> None:
# Test Vertex AI Search Grounding
# Unable to test Google Search grounding due to allowlist restrictions.
data_store_id = "test-search-engine_1689960780551"
data_store_path = f"projects/{PROJECT_ID}/locations/{LOCATION}/collections/default_collection/dataStores/{data_store_id}"
response = gemini_grounding_example.generate_text_with_grounding(
Expand Down
Loading