(
content: Iterator[bytes],
*,
sync: bool,
client: Anthropic,
async_client: AsyncAnthropic,
)
| 446 | await iter_next(iter) |
| 447 | |
| 448 | |
| 449 | def make_event_iterator( |
| 450 | content: Iterator[bytes], |
| 451 | *, |
| 452 | sync: bool, |
| 453 | client: Anthropic, |
| 454 | async_client: AsyncAnthropic, |
| 455 | ) -> Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent]: |
| 456 | if sync: |
| 457 | return Stream(cast_to=object, client=client, response=httpx2.Response(200, content=content))._iter_events() |
| 458 | |
| 459 | return AsyncStream( |
| 460 | cast_to=object, client=async_client, response=httpx2.Response(200, content=to_aiter(content)) |
| 461 | )._iter_events() |
| 462 | |
| 463 |
no test coverage detected