(input: u64, output: u64)
| 95 | |
| 96 | impl TokenUsage { |
| 97 | pub fn new(input: u64, output: u64) -> Self { |
| 98 | Self { |
| 99 | input, |
| 100 | output, |
| 101 | cache_read: 0, |
| 102 | cache_write: 0, |
| 103 | total: input + output, |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | pub fn with_cache(mut self, read: u64, write: u64) -> Self { |
| 108 | self.cache_read = read; |