Skip to content

Commit 3d474dc

Browse files
committed
feat(genai): update
1 parent b2d0459 commit 3d474dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

translate/samples/snippets/translate_with_gemini.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def translate_text(text: str, target_language_code: str = "fr") -> GenerationRes
3131
responses: The response from the model containing the translated text.
3232
"""
3333
# Initializes the Vertex AI with the specified project and location
34-
vertexai.init(project=PROJECT_ID, location="europe-west2")
34+
vertexai.init(project=PROJECT_ID, location="us-central1")
3535

3636
model = GenerativeModel("gemini-2.0-flash-001")
3737

translate/samples/snippets/translate_with_gemini_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717

1818
def test_translate_text_with_gemini() -> None:
1919
response = translate_with_gemini.translate_text("Hello World!", "fr")
20-
assert "Bonjour le monde" in response.candidates[0].content.text
20+
assert response.candidates[0].content.text

0 commit comments

Comments
 (0)