The events of `stream_events`, with a `tool_use` block after the text.
()
| 752 | |
| 753 | |
| 754 | def tool_stream_events() -> list[dict[str, Any]]: |
| 755 | """The events of `stream_events`, with a `tool_use` block after the text.""" |
| 756 | events = stream_events() |
| 757 | events[4:4] = [ |
| 758 | { |
| 759 | "type": "content_block_start", |
| 760 | "index": 1, |
| 761 | "content_block": {"type": "tool_use", "id": "toolu_1", "name": "get_weather", "input": {}}, |
| 762 | }, |
| 763 | {"type": "content_block_delta", "index": 1, "delta": {"type": "input_json_delta", "partial_json": '{"city": '}}, |
| 764 | {"type": "content_block_delta", "index": 1, "delta": {"type": "input_json_delta", "partial_json": '"SF"}'}}, |
| 765 | {"type": "content_block_stop", "index": 1}, |
| 766 | ] |
| 767 | return events |
| 768 | |
| 769 | |
| 770 | TOOL_STREAM_OUTPUT: list[dict[str, Any]] = [ |
no test coverage detected