Skip to content

Commit

Permalink
remove async support from StreamWrapper until further notice
Browse files Browse the repository at this point in the history
  • Loading branch information
alizenhom committed Aug 12, 2024
1 parent bb97ec9 commit e15d443
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,6 @@ def __enter__(self):
def __exit__(self, exc_type, exc_val, exc_tb):
self.cleanup()

async def __aenter__(self):
self.setup()
return self

async def __aexit__(self, exc_type, exc_val, exc_tb):
self.cleanup()

def __iter__(self):
return self

Expand All @@ -385,18 +378,6 @@ def __next__(self):
self.cleanup()
raise

def __aiter__(self):
return self

async def __anext__(self):
try:
chunk = await self.stream.__anext__()
self.process_chunk(chunk)
return chunk
except StopAsyncIteration:
self.cleanup()
raise StopAsyncIteration

def process_chunk(self, chunk):
if hasattr(chunk, "model") and chunk.model is not None:
set_span_attribute(
Expand Down

0 comments on commit e15d443

Please sign in to comment.