Skip to content

Commit c53fe3d

Browse files
chore: imports at top
1 parent c07d1e8 commit c53fe3d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

posthog/ai/gemini/gemini.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import uuid
44
from typing import Any, Dict, Optional
55

6-
from posthog.ai.types import TokenUsage
6+
from posthog.ai.types import TokenUsage, StreamingEventData
7+
from posthog.ai.utils import merge_system_prompt
78

89
try:
910
from google import genai
@@ -355,8 +356,6 @@ def _capture_streaming_event(
355356
latency: float,
356357
output: Any,
357358
):
358-
from posthog.ai.types import StreamingEventData
359-
360359
# Prepare standardized event data
361360
formatted_input = self._format_input(contents, **kwargs)
362361
sanitized_input = sanitize_gemini(formatted_input)
@@ -382,7 +381,6 @@ def _capture_streaming_event(
382381

383382
def _format_input(self, contents, **kwargs):
384383
"""Format input contents for PostHog tracking"""
385-
from posthog.ai.utils import merge_system_prompt
386384

387385
# Create kwargs dict with contents for merge_system_prompt
388386
input_kwargs = {"contents": contents, **kwargs}

0 commit comments

Comments
 (0)