MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / iter_bytes

Method iter_bytes

src/opencode_ai/_response.py:451–458  ·  view source on GitHub ↗

A byte-iterator over the decoded response content. This automatically handles gzip, deflate and brotli encoded responses.

(self, chunk_size: int | None = None)

Source from the content-addressed store, hash-verified

449 await self.http_response.aclose()
450
451 async def iter_bytes(self, chunk_size: int | None = None) -> AsyncIterator[bytes]:
452 """
453 A byte-iterator over the decoded response content.
454
455 This automatically handles gzip, deflate and brotli encoded responses.
456 """
457 async for chunk in self.http_response.aiter_bytes(chunk_size):
458 yield chunk
459
460 async def iter_text(self, chunk_size: int | None = None) -> AsyncIterator[str]:
461 """A str-iterator over the decoded response content

Callers

nothing calls this directly

Calls 1

aiter_bytesMethod · 0.45

Tested by

no test coverage detected