Skip to content

Commit 0d64c2f

Browse files
committed
Simplify async streaming solution per PR comment.
1 parent 3dc2734 commit 0d64c2f

File tree

1 file changed

+1
-5
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai

1 file changed

+1
-5
lines changed

instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/generate_content.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -668,11 +668,7 @@ async def _response_async_generator_wrapper():
668668
finally:
669669
helper.finalize_processing()
670670

671-
class _GeneratorProvider:
672-
def __aiter__(self):
673-
return _response_async_generator_wrapper()
674-
675-
return _GeneratorProvider()
671+
return _response_async_generator_wrapper()
676672

677673
return instrumented_generate_content_stream
678674

0 commit comments

Comments
 (0)