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

Method __init__

src/opencode_ai/_streaming.py:91–102  ·  view source on GitHub ↗
(
        self,
        *,
        cast_to: type[_T],
        response: httpx.Response,
        client: AsyncOpencode,
    )

Source from the content-addressed store, hash-verified

89 _decoder: SSEDecoder | SSEBytesDecoder
90
91 def __init__(
92 self,
93 *,
94 cast_to: type[_T],
95 response: httpx.Response,
96 client: AsyncOpencode,
97 ) -> None:
98 self.response = response
99 self._cast_to = cast_to
100 self._client = client
101 self._decoder = client._make_sse_decoder()
102 self._iterator = self.__stream__()
103
104 async def __anext__(self) -> _T:
105 return await self._iterator.__anext__()

Callers

nothing calls this directly

Calls 2

__stream__Method · 0.95
_make_sse_decoderMethod · 0.80

Tested by

no test coverage detected