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

Method read

src/openai/_response.py:443–451  ·  view source on GitHub ↗

Read and return the binary response content.

(self)

Source from the content-addressed store, hash-verified

441 return cast(R, parsed)
442
443 async def read(self) -> bytes:
444 """Read and return the binary response content."""
445 try:
446 return await self.http_response.aread()
447 except httpx.StreamConsumed as exc:
448 # the default error raised by httpx isn't very
449 # helpful in our case so we re-raise it with
450 # a different error message
451 raise StreamAlreadyConsumed() from exc
452
453 async def text(self) -> str:
454 """Read and decode the response content into a string."""

Callers 3

parseMethod · 0.95
textMethod · 0.95
jsonMethod · 0.95

Calls 2

areadMethod · 0.80

Tested by

no test coverage detected