A method shaped like a generated streaming method, whose response is `body`.
(client: Anthropic, body: Body, *, stream_cls: type[Stream[object]] = Stream[object])
| 224 | |
| 225 | |
| 226 | def requester(client: Anthropic, body: Body, *, stream_cls: type[Stream[object]] = Stream[object]) -> Request: |
| 227 | """A method shaped like a generated streaming method, whose response is `body`.""" |
| 228 | client = client.with_options(http_client=httpx2.Client(transport=body.transport())) |
| 229 | |
| 230 | def request(*, extra_headers: Headers | None = None) -> Stream[object]: |
| 231 | return client.get( |
| 232 | "/stream", |
| 233 | cast_to=object, |
| 234 | options=make_request_options(extra_headers=extra_headers), |
| 235 | stream=True, |
| 236 | stream_cls=stream_cls, |
| 237 | ) |
| 238 | |
| 239 | return request |
| 240 | |
| 241 | |
| 242 | def async_requester( |