MCPcopy
hub / github.com/openai/openai-python / iter_next

Function iter_next

tests/test_streaming.py:224–228  ·  view source on GitHub ↗
(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent])

Source from the content-addressed store, hash-verified

222 yield chunk
223
224
225async def iter_next(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent]) -> ServerSentEvent:
226 if isinstance(iter, AsyncIterator):
227 return await iter.__anext__()
228
229 return next(iter)
230
231

Calls 1

__anext__Method · 0.45

Tested by

no test coverage detected