Method RecordSpend
- Namespace
- MailFathom.Infrastructure.Observability
- Assembly
- MailFathom.Infrastructure.dll
RecordSpend(ChatTokenUsage)
Adds what one provider call consumed to the current period.
public void RecordSpend(ChatTokenUsage usage)
Parameters
usageChatTokenUsageThe tokens the call sent and received.
Remarks
Recorded per call rather than per run, so a run that is stopped part way through has still spent what it spent.
Exceptions
- ArgumentNullException
Thrown when
usageis null.