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

Method iter_bytes

src/opencode_ai/_response.py:351–358  ·  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

349 self.http_response.close()
350
351 def iter_bytes(self, chunk_size: int | None = None) -> Iterator[bytes]:
352 """
353 A byte-iterator over the decoded response content.
354
355 This automatically handles gzip, deflate and brotli encoded responses.
356 """
357 for chunk in self.http_response.iter_bytes(chunk_size):
358 yield chunk
359
360 def iter_text(self, chunk_size: int | None = None) -> Iterator[str]:
361 """A str-iterator over the decoded response content

Callers 4

write_to_fileMethod · 0.45
write_to_fileMethod · 0.45
stream_to_fileMethod · 0.45
stream_to_fileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected