Class: OpenAI::Models::Live::SessionUsageUpdatedEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Live::SessionUsageUpdatedEvent
- Defined in:
- lib/openai/models/live/session_usage_updated_event.rb,
sig/openai/models/live/session_usage_updated_event.rbs
Defined Under Namespace
Classes: ContextWindow
Instance Attribute Summary collapse
-
#client_event_id ⇒ String?
The event_id of the client command associated with this server event, when supplied.
-
#context_window ⇒ OpenAI::Models::Live::SessionUsageUpdatedEvent::ContextWindow?
The latest measured Live context-window usage.
-
#event_id ⇒ String
The unique ID of the Live server event.
-
#type ⇒ Symbol, :"session.usage.updated"
The event type, always
session.usage.updated. -
#usage ⇒ OpenAI::Models::Live::SessionUsage
The cumulative Live audio usage so far.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(event_id:, usage:, client_event_id: nil, context_window: nil, type: :"session.usage.updated") ⇒ Object
constructor
Reports cumulative Live audio usage and, when available, the most recent context-window usage.
- #to_hash ⇒ {
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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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(event_id:, usage:, client_event_id: nil, context_window: nil, type: :"session.usage.updated") ⇒ Object
Reports cumulative Live audio usage and, when available, the most recent context-window usage. Delegated Responses token usage is reported separately in response.event events.
|
|
# File 'lib/openai/models/live/session_usage_updated_event.rb', line 39
|
Instance Attribute Details
#client_event_id ⇒ String?
The event_id of the client command associated with this server event, when supplied.
30 |
# File 'lib/openai/models/live/session_usage_updated_event.rb', line 30 optional :client_event_id, String |
#context_window ⇒ OpenAI::Models::Live::SessionUsageUpdatedEvent::ContextWindow?
The latest measured Live context-window usage. Omitted when the context limit is unknown.
37 |
# File 'lib/openai/models/live/session_usage_updated_event.rb', line 37 optional :context_window, -> { OpenAI::Live::SessionUsageUpdatedEvent::ContextWindow } |
#event_id ⇒ String
The unique ID of the Live server event.
11 |
# File 'lib/openai/models/live/session_usage_updated_event.rb', line 11 required :event_id, String |
#type ⇒ Symbol, :"session.usage.updated"
The event type, always session.usage.updated.
17 |
# File 'lib/openai/models/live/session_usage_updated_event.rb', line 17 required :type, const: :"session.usage.updated" |
#usage ⇒ OpenAI::Models::Live::SessionUsage
The cumulative Live audio usage so far.
23 |
# File 'lib/openai/models/live/session_usage_updated_event.rb', line 23 required :usage, -> { OpenAI::Live::SessionUsage } |
Instance Method Details
#to_hash ⇒ {
38 |
# File 'sig/openai/models/live/session_usage_updated_event.rbs', line 38
def to_hash: -> {
|