File tree Expand file tree Collapse file tree 2 files changed +271
-105
lines changed
Expand file tree Collapse file tree 2 files changed +271
-105
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ async def _create_streaming(
128128 start_time = time .time ()
129129 usage_stats : TokenUsage = TokenUsage ()
130130 final_content = []
131- response = self ._original .create (** kwargs )
131+ response = await self ._original .create (** kwargs )
132132
133133 async def async_generator ():
134134 nonlocal usage_stats
@@ -345,7 +345,7 @@ async def _create_streaming(
345345 if "stream_options" not in kwargs :
346346 kwargs ["stream_options" ] = {}
347347 kwargs ["stream_options" ]["include_usage" ] = True
348- response = self ._original .create (** kwargs )
348+ response = await self ._original .create (** kwargs )
349349
350350 async def async_generator ():
351351 nonlocal usage_stats
@@ -499,7 +499,7 @@ async def create(
499499 posthog_trace_id = str (uuid .uuid4 ())
500500
501501 start_time = time .time ()
502- response = self ._original .create (** kwargs )
502+ response = await self ._original .create (** kwargs )
503503 end_time = time .time ()
504504
505505 # Extract usage statistics if available
You can’t perform that action at this time.
0 commit comments