Skip to content

Commit a682207

Browse files
committed
fix: formatting
1 parent 9350f9b commit a682207

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

llm_observability_examples.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
posthog_client=posthog,
2222
)
2323

24+
2425
def main_sync():
2526
trace_id = str(uuid.uuid4())
2627
print("Trace ID:", trace_id)
@@ -89,7 +90,7 @@ async def basic_async_openai_call(distinct_id, trace_id, properties):
8990

9091

9192
def streaming_openai_call(distinct_id, trace_id, properties):
92-
93+
9394
response = openai_client.chat.completions.create(
9495
model="gpt-4o-mini",
9596
messages=[

posthog/ai/providers/openai/openai_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def _capture_streaming_event(
131131
latency: float,
132132
output: str,
133133
):
134-
134+
135135
if posthog_trace_id is None:
136136
posthog_trace_id = uuid.uuid4()
137137

posthog/ai/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def call_llm_and_track_usage(
6363
response = call_method(**kwargs)
6464
except Exception as exc:
6565
error = exc
66-
http_status = getattr(exc, "status_code", 0) # default to 0 becuase its liekly an SDK error
66+
http_status = getattr(exc, "status_code", 0) # default to 0 becuase its liekly an SDK error
6767
finally:
6868
end_time = time.time()
6969
latency = end_time - start_time
@@ -122,7 +122,7 @@ async def call_llm_and_track_usage_async(
122122
response = await call_async_method(**kwargs)
123123
except Exception as exc:
124124
error = exc
125-
http_status = getattr(exc, "status_code", 0) # default to 0 because its likely an SDK error
125+
http_status = getattr(exc, "status_code", 0) # default to 0 because its likely an SDK error
126126
finally:
127127
end_time = time.time()
128128
latency = end_time - start_time

0 commit comments

Comments
 (0)