TotalInputTokens returns the sum of input tokens across all recorded token usages.
()
| 86 | |
| 87 | // TotalInputTokens returns the sum of input tokens across all recorded token usages. |
| 88 | func (m *MockRecorder) TotalInputTokens() int64 { |
| 89 | m.mu.Lock() |
| 90 | defer m.mu.Unlock() |
| 91 | var total int64 |
| 92 | for _, el := range m.tokenUsages { |
| 93 | total += el.Input |
| 94 | } |
| 95 | return total |
| 96 | } |
| 97 | |
| 98 | // TotalOutputTokens returns the sum of output tokens across all recorded token usages. |
| 99 | func (m *MockRecorder) TotalOutputTokens() int64 { |
no outgoing calls