An entry of a response's `usage.iterations`.
(
type: str, input_tokens: int = 10, output_tokens: int = 5, cache_read: int = 0, cache_creation: int = 0
)
| 723 | |
| 724 | |
| 725 | def iteration( |
| 726 | type: str, input_tokens: int = 10, output_tokens: int = 5, cache_read: int = 0, cache_creation: int = 0 |
| 727 | ) -> dict[str, Any]: |
| 728 | """An entry of a response's `usage.iterations`.""" |
| 729 | return { |
| 730 | "type": type, |
| 731 | "input_tokens": input_tokens, |
| 732 | "output_tokens": output_tokens, |
| 733 | "cache_read_input_tokens": cache_read, |
| 734 | "cache_creation_input_tokens": cache_creation, |
| 735 | } |
| 736 | |
| 737 | |
| 738 | def message_with(iterations: list[dict[str, Any]] | None) -> dict[str, Any]: |
no outgoing calls
no test coverage detected