File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def create(
4848 ** kwargs : Any ,
4949 ):
5050 if posthog_trace_id is None :
51- posthog_trace_id = uuid .uuid4 ()
51+ posthog_trace_id = str ( uuid .uuid4 () )
5252
5353 if kwargs .get ("stream" , False ):
5454 return self ._create_streaming (
@@ -408,7 +408,7 @@ def create(
408408 The response from OpenAI's embeddings.create call.
409409 """
410410 if posthog_trace_id is None :
411- posthog_trace_id = uuid .uuid4 ()
411+ posthog_trace_id = str ( uuid .uuid4 () )
412412
413413 start_time = time .time ()
414414 response = super ().create (** kwargs )
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ async def create(
4747 ** kwargs : Any ,
4848 ):
4949 if posthog_trace_id is None :
50- posthog_trace_id = uuid .uuid4 ()
50+ posthog_trace_id = str ( uuid .uuid4 () )
5151
5252 if kwargs .get ("stream" , False ):
5353 return await self ._create_streaming (
@@ -402,7 +402,7 @@ async def create(
402402 The response from OpenAI's embeddings.create call.
403403 """
404404 if posthog_trace_id is None :
405- posthog_trace_id = uuid .uuid4 ()
405+ posthog_trace_id = str ( uuid .uuid4 () )
406406
407407 start_time = time .time ()
408408 response = await super ().create (** kwargs )
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ def call_llm_and_track_usage(
269269 latency = end_time - start_time
270270
271271 if posthog_trace_id is None :
272- posthog_trace_id = uuid .uuid4 ()
272+ posthog_trace_id = str ( uuid .uuid4 () )
273273
274274 if response and hasattr (response , "usage" ):
275275 usage = get_usage (response , provider )
@@ -364,7 +364,7 @@ async def call_llm_and_track_usage_async(
364364 latency = end_time - start_time
365365
366366 if posthog_trace_id is None :
367- posthog_trace_id = uuid .uuid4 ()
367+ posthog_trace_id = str ( uuid .uuid4 () )
368368
369369 if response and hasattr (response , "usage" ):
370370 usage = get_usage (response , provider )
You can’t perform that action at this time.
0 commit comments