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

Method __init__

src/openai/_streaming.py:139–152  ·  view source on GitHub ↗
(
        self,
        *,
        cast_to: type[_T],
        response: httpx.Response,
        client: AsyncOpenAI,
        options: Optional[FinalRequestOptions] = None,
    )

Source from the content-addressed store, hash-verified

137 _decoder: SSEDecoder | SSEBytesDecoder
138
139 def __init__(
140 self,
141 *,
142 cast_to: type[_T],
143 response: httpx.Response,
144 client: AsyncOpenAI,
145 options: Optional[FinalRequestOptions] = None,
146 ) -> None:
147 self.response = response
148 self._cast_to = cast_to
149 self._client = client
150 self._options = options
151 self._decoder = client._make_sse_decoder()
152 self._iterator = self.__stream__()
153
154 async def __anext__(self) -> _T:
155 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