copyWithWrapped method

LLMInputOutputTokensUsage copyWithWrapped({
  1. Wrapped<LLMTokensCategoryUsage?>? input,
  2. Wrapped<LLMTokensCategoryUsage?>? inputCacheRead,
  3. Wrapped<LLMTokensCategoryUsage?>? inputCacheWrite,
  4. Wrapped<LLMTokensCategoryUsage?>? outputTotal,
})

Implementation

LLMInputOutputTokensUsage copyWithWrapped(
    {Wrapped<LLMTokensCategoryUsage?>? input,
    Wrapped<LLMTokensCategoryUsage?>? inputCacheRead,
    Wrapped<LLMTokensCategoryUsage?>? inputCacheWrite,
    Wrapped<LLMTokensCategoryUsage?>? outputTotal}) {
  return LLMInputOutputTokensUsage(
      input: (input != null ? input.value : this.input),
      inputCacheRead: (inputCacheRead != null
          ? inputCacheRead.value
          : this.inputCacheRead),
      inputCacheWrite: (inputCacheWrite != null
          ? inputCacheWrite.value
          : this.inputCacheWrite),
      outputTotal:
          (outputTotal != null ? outputTotal.value : this.outputTotal));
}