Class: OpenAI::Models::Live::SessionUsage
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Live::SessionUsage
- Defined in:
- lib/openai/models/live/session_usage.rb,
sig/openai/models/live/session_usage.rbs
Instance Attribute Summary collapse
-
#active_seconds ⇒ Integer?
The remaining billable seconds attributed to active audio and any unused prepaid duration.
-
#paused_seconds ⇒ Integer?
Billable time attributed to paused inference at the configured rate, rounded down to whole seconds.
-
#seconds ⇒ Float
The cumulative billable duration in whole seconds.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(seconds:, active_seconds: nil, paused_seconds: nil) ⇒ SessionUsage
constructor
A new instance of SessionUsage.
- #to_hash ⇒ { seconds: Float, ?active_seconds: Integer, ?paused_seconds: Integer }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(seconds:, active_seconds: nil, paused_seconds: nil) ⇒ SessionUsage
Returns a new instance of SessionUsage.
|
|
# File 'lib/openai/models/live/session_usage.rb', line 28
|
Instance Attribute Details
#active_seconds ⇒ Integer?
The remaining billable seconds attributed to active audio and any unused prepaid duration.
19 |
# File 'lib/openai/models/live/session_usage.rb', line 19 optional :active_seconds, Integer |
#paused_seconds ⇒ Integer?
Billable time attributed to paused inference at the configured rate, rounded down to whole seconds.
26 |
# File 'lib/openai/models/live/session_usage.rb', line 26 optional :paused_seconds, Integer |
#seconds ⇒ Float
The cumulative billable duration in whole seconds. When present, the active and paused breakdown adds up to this total.
12 |
# File 'lib/openai/models/live/session_usage.rb', line 12 required :seconds, Float |
Instance Method Details
#to_hash ⇒ { seconds: Float, ?active_seconds: Integer, ?paused_seconds: Integer }
43 44 45 46 47 |
# File 'sig/openai/models/live/session_usage.rbs', line 43
def to_hash: -> {
seconds: Float,
?active_seconds: Integer,
?paused_seconds: Integer
}
|