operator + method

AIUsage operator +(
  1. AIUsage other
)

Implementation

AIUsage operator +(AIUsage other) {
  return AIUsage(
    promptTokens: promptTokens + other.promptTokens,
    completionTokens: completionTokens + other.completionTokens,
    estimatedCostUsd: (estimatedCostUsd ?? 0) + (other.estimatedCostUsd ?? 0),
  );
}