Skip to content

Commit 8b2b9e3

Browse files
committed
chore: cleanup comments
1 parent 9a454f6 commit 8b2b9e3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

posthog/ai/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
from .providers.openai.openai_async import AsyncOpenAI
33

44
__all__ = ["OpenAI", "AsyncOpenAI"]
5+
# TODO: add Azure OpenAI wrapper

posthog/ai/providers/openai/openai.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def __init__(
2828
of the global posthog.
2929
**openai_config: Any additional keyword args to set on openai (e.g. organization="xxx").
3030
"""
31-
# The standard OpenAI client for synchronous usage
3231
self._openai_client = openai.OpenAI(**openai_config)
3332
self._posthog_client = posthog_client
3433

@@ -60,7 +59,7 @@ def create(
6059
**kwargs: Any,
6160
):
6261
"""
63-
Wraps openai chat completions (sync) and captures a $ai_generation event in PostHog.
62+
Wraps openai chat completions and captures a $ai_generation event in PostHog.
6463
6564
PostHog-specific parameters:
6665
- posthog_distinct_id: Ties the resulting event to a user in PostHog.
@@ -75,7 +74,7 @@ def create(
7574
return process_sync_streaming_response(
7675
response=response,
7776
ph_client=self._ph_client,
78-
event_properties={}, # Will be filled in by the streaming logic
77+
event_properties={},
7978
distinct_id=distinct_id,
8079
)
8180

posthog/ai/providers/openai/openai_async.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def __init__(
2727
posthog_client: If provided, events will be captured via this client instance.
2828
**openai_config: Additional keyword args (e.g. organization="xxx").
2929
"""
30-
# The async OpenAI client for async usage
3130
self._openai_client = openai.AsyncOpenAI(**openai_config)
3231
self._posthog_client = posthog_client
3332

@@ -73,7 +72,7 @@ async def create(
7372
return process_async_streaming_response(
7473
response=response,
7574
ph_client=self._ph_client,
76-
event_properties={}, # The streaming method will define event props
75+
event_properties={},
7776
distinct_id=distinct_id,
7877
)
7978

0 commit comments

Comments
 (0)