@@ -143,20 +143,36 @@ def image_openai_call():
143143 print (response )
144144 return response
145145
146+
146147# none instrumented
147148async def image_async_openai_call ():
148- response = await async_openai_client .images .generate (model = "dall-e-3" , prompt = "A cute baby hedgehog" , n = 1 , size = "1024x1024" )
149+ response = await async_openai_client .images .generate (
150+ model = "dall-e-3" , prompt = "A cute baby hedgehog" , n = 1 , size = "1024x1024"
151+ )
149152 print (response )
150153 return response
151154
152155
153156def embedding_openai_call (posthog_distinct_id , posthog_trace_id , posthog_properties ):
154- response = openai_client .embeddings .create (input = "The hedgehog is cute" , model = "text-embedding-3-small" , posthog_distinct_id = posthog_distinct_id , posthog_trace_id = posthog_trace_id , posthog_properties = posthog_properties )
157+ response = openai_client .embeddings .create (
158+ input = "The hedgehog is cute" ,
159+ model = "text-embedding-3-small" ,
160+ posthog_distinct_id = posthog_distinct_id ,
161+ posthog_trace_id = posthog_trace_id ,
162+ posthog_properties = posthog_properties ,
163+ )
155164 print (response )
156165 return response
157166
167+
158168async def embedding_async_openai_call (posthog_distinct_id , posthog_trace_id , posthog_properties ):
159- response = await async_openai_client .embeddings .create (input = "The hedgehog is cute" , model = "text-embedding-3-small" , posthog_distinct_id = posthog_distinct_id , posthog_trace_id = posthog_trace_id , posthog_properties = posthog_properties )
169+ response = await async_openai_client .embeddings .create (
170+ input = "The hedgehog is cute" ,
171+ model = "text-embedding-3-small" ,
172+ posthog_distinct_id = posthog_distinct_id ,
173+ posthog_trace_id = posthog_trace_id ,
174+ posthog_properties = posthog_properties ,
175+ )
160176 print (response )
161177 return response
162178
0 commit comments