(
content: Iterator[bytes],
*,
sync: bool,
client: Anthropic,
async_client: AsyncAnthropic,
)
| 374 | await iter_next(iter) |
| 375 | |
| 376 | |
| 377 | def make_event_iterator( |
| 378 | content: Iterator[bytes], |
| 379 | *, |
| 380 | sync: bool, |
| 381 | client: Anthropic, |
| 382 | async_client: AsyncAnthropic, |
| 383 | ) -> Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent]: |
| 384 | if sync: |
| 385 | return Stream(cast_to=object, client=client, response=httpx2.Response(200, content=content))._iter_events() |
| 386 | |
| 387 | return AsyncStream( |
| 388 | cast_to=object, client=async_client, response=httpx2.Response(200, content=to_aiter(content)) |
| 389 | )._iter_events() |
| 390 | |
| 391 |
no test coverage detected