Class: CodexSDK::TokenUsage
- Inherits:
-
Data
- Object
- Data
- CodexSDK::TokenUsage
- Defined in:
- lib/codex_sdk/options.rb
Overview
Detailed token usage from rollout token_count snapshots.
Instance Attribute Summary collapse
-
#cached_input_tokens ⇒ Object
readonly
Returns the value of attribute cached_input_tokens.
-
#input_tokens ⇒ Object
readonly
Returns the value of attribute input_tokens.
-
#output_tokens ⇒ Object
readonly
Returns the value of attribute output_tokens.
-
#reasoning_output_tokens ⇒ Object
readonly
Returns the value of attribute reasoning_output_tokens.
-
#total_tokens ⇒ Object
readonly
Returns the value of attribute total_tokens.
Instance Method Summary collapse
-
#initialize(input_tokens: 0, cached_input_tokens: 0, output_tokens: 0, reasoning_output_tokens: 0, total_tokens: 0) ⇒ TokenUsage
constructor
A new instance of TokenUsage.
Constructor Details
#initialize(input_tokens: 0, cached_input_tokens: 0, output_tokens: 0, reasoning_output_tokens: 0, total_tokens: 0) ⇒ TokenUsage
Returns a new instance of TokenUsage.
74 75 76 77 78 79 80 81 82 |
# File 'lib/codex_sdk/options.rb', line 74 def initialize( input_tokens: 0, cached_input_tokens: 0, output_tokens: 0, reasoning_output_tokens: 0, total_tokens: 0 ) super end |
Instance Attribute Details
#cached_input_tokens ⇒ Object (readonly)
Returns the value of attribute cached_input_tokens
67 68 69 |
# File 'lib/codex_sdk/options.rb', line 67 def cached_input_tokens @cached_input_tokens end |
#input_tokens ⇒ Object (readonly)
Returns the value of attribute input_tokens
67 68 69 |
# File 'lib/codex_sdk/options.rb', line 67 def input_tokens @input_tokens end |
#output_tokens ⇒ Object (readonly)
Returns the value of attribute output_tokens
67 68 69 |
# File 'lib/codex_sdk/options.rb', line 67 def output_tokens @output_tokens end |
#reasoning_output_tokens ⇒ Object (readonly)
Returns the value of attribute reasoning_output_tokens
67 68 69 |
# File 'lib/codex_sdk/options.rb', line 67 def reasoning_output_tokens @reasoning_output_tokens end |
#total_tokens ⇒ Object (readonly)
Returns the value of attribute total_tokens
67 68 69 |
# File 'lib/codex_sdk/options.rb', line 67 def total_tokens @total_tokens end |