Class Usage

java.lang.Object
ai.acolite.agentsdk.core.Usage

public class Usage extends Object
Usage

Tracks token usage statistics from API calls.

Ported from TypeScript OpenAI Agents SDK Source: usage.ts

  • Constructor Details

    • Usage

      public Usage()
  • Method Details

    • empty

      public static Usage empty()
      Creates an empty Usage instance with all counts set to 0
    • add

      public Usage add(Usage other)
      Adds the usage from another Usage instance to this one
      Parameters:
      other - The Usage instance to add
      Returns:
      A new Usage instance with summed values