Class: CodexSDK::Usage

Inherits:
Data
  • Object
show all
Defined in:
lib/codex_sdk/options.rb

Overview

Token usage from a completed turn.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_tokens: 0, cached_input_tokens: 0, output_tokens: 0) ⇒ Usage

Returns a new instance of Usage.



61
62
63
# File 'lib/codex_sdk/options.rb', line 61

def initialize(input_tokens: 0, cached_input_tokens: 0, output_tokens: 0)
  super
end

Instance Attribute Details

#cached_input_tokensObject (readonly)

Returns the value of attribute cached_input_tokens

Returns:

  • (Object)

    the current value of cached_input_tokens



60
61
62
# File 'lib/codex_sdk/options.rb', line 60

def cached_input_tokens
  @cached_input_tokens
end

#input_tokensObject (readonly)

Returns the value of attribute input_tokens

Returns:

  • (Object)

    the current value of input_tokens



60
61
62
# File 'lib/codex_sdk/options.rb', line 60

def input_tokens
  @input_tokens
end

#output_tokensObject (readonly)

Returns the value of attribute output_tokens

Returns:

  • (Object)

    the current value of output_tokens



60
61
62
# File 'lib/codex_sdk/options.rb', line 60

def output_tokens
  @output_tokens
end