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

Method __init__

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

Source from the content-addressed store, hash-verified

26 _decoder: SSEBytesDecoder
27
28 def __init__(
29 self,
30 *,
31 cast_to: type[_T],
32 response: httpx.Response,
33 client: Opencode,
34 ) -> None:
35 self.response = response
36 self._cast_to = cast_to
37 self._client = client
38 self._decoder = client._make_sse_decoder()
39 self._iterator = self.__stream__()
40
41 def __next__(self) -> _T:
42 return self._iterator.__next__()

Callers

nothing calls this directly

Calls 2

__stream__Method · 0.95
_make_sse_decoderMethod · 0.80

Tested by

no test coverage detected