Skip to content

Commit 498f4ef

Browse files
committed
chore(llmo): run formatter
1 parent bc1d2ca commit 498f4ef

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

posthog/ai/gemini/gemini.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def __init__(
145145

146146
# Build genai.Client arguments
147147
client_args = {}
148-
148+
149149
# Add Vertex AI parameters if provided
150150
if vertexai is not None:
151151
client_args["vertexai"] = vertexai

posthog/test/ai/gemini/test_gemini.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,12 @@ def test_new_client_override_defaults(
320320
assert props["urgent"] is True # from call
321321

322322

323-
def test_vertex_ai_parameters_passed_through(mock_client, mock_google_genai_client, mock_gemini_response):
323+
def test_vertex_ai_parameters_passed_through(
324+
mock_client, mock_google_genai_client, mock_gemini_response
325+
):
324326
"""Test that Vertex AI parameters are properly passed to genai.Client"""
325327
mock_google_genai_client.models.generate_content.return_value = mock_gemini_response
326-
328+
327329
# Mock credentials object
328330
mock_credentials = MagicMock()
329331
mock_debug_config = MagicMock()
@@ -347,13 +349,13 @@ def test_vertex_ai_parameters_passed_through(mock_client, mock_google_genai_clie
347349
project="test-project",
348350
location="us-central1",
349351
debug_config=mock_debug_config,
350-
http_options=mock_http_options
352+
http_options=mock_http_options,
351353
)
352354

353355

354356
def test_api_key_mode(mock_client, mock_google_genai_client):
355357
"""Test API key authentication mode"""
356-
358+
357359
# Create client with just API key (traditional mode)
358360
Client(
359361
api_key="test-api-key",
@@ -364,10 +366,12 @@ def test_api_key_mode(mock_client, mock_google_genai_client):
364366
google_genai.Client.assert_called_once_with(api_key="test-api-key")
365367

366368

367-
def test_vertex_ai_mode_with_optional_api_key(mock_client, mock_google_genai_client, mock_gemini_response):
369+
def test_vertex_ai_mode_with_optional_api_key(
370+
mock_client, mock_google_genai_client, mock_gemini_response
371+
):
368372
"""Test Vertex AI mode with optional API key"""
369373
mock_google_genai_client.models.generate_content.return_value = mock_gemini_response
370-
374+
371375
mock_credentials = MagicMock()
372376

373377
# Create client with Vertex AI + API key
@@ -384,5 +388,5 @@ def test_vertex_ai_mode_with_optional_api_key(mock_client, mock_google_genai_cli
384388
vertexai=True,
385389
api_key="test-api-key",
386390
credentials=mock_credentials,
387-
project="test-project"
391+
project="test-project",
388392
)

0 commit comments

Comments
 (0)