Class: OpenAI::Models::Live::SessionClosedEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Live::SessionClosedEvent
- Defined in:
- lib/openai/models/live/session_closed_event.rb,
sig/openai/models/live/session_closed_event.rbs
Defined Under Namespace
Modules: Reason
Instance Attribute Summary collapse
-
#client_event_id ⇒ String?
The event_id of the client command associated with this server event, when supplied.
-
#event_id ⇒ String
The unique ID of the Live server event.
-
#reason ⇒ Symbol, OpenAI::Models::Live::SessionClosedEvent::Reason
Why the Live session ended:
close_requestedfor an application close or hangup request,expiredfor the session duration limit,contentfor a safety filter,remote_hangupfor a graceful remote disconnect, orconnection_lostfor an unexpected primary or upstream disconnection. -
#session ⇒ OpenAI::Models::Live::SessionResource
The resolved Live session configuration and server-assigned session metadata.
-
#type ⇒ Symbol, :"session.closed"
The event type, always
session.closed. -
#usage ⇒ OpenAI::Models::Live::SessionUsage
The final cumulative Live audio usage after session finalization.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(event_id:, reason:, session:, usage:, client_event_id: nil, type: :"session.closed") ⇒ Object
constructor
Returned after the Live session finishes finalizing, with the close reason, final session snapshot, and cumulative audio 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:, reason:, session:, usage:, client_event_id: nil, type: :"session.closed") ⇒ Object
Returned after the Live session finishes finalizing, with the close reason, final session snapshot, and cumulative audio usage. A connection closing without this event does not confirm successful finalization.
|
|
# File 'lib/openai/models/live/session_closed_event.rb', line 47
|
Instance Attribute Details
#client_event_id ⇒ String?
The event_id of the client command associated with this server event, when supplied.
45 |
# File 'lib/openai/models/live/session_closed_event.rb', line 45 optional :client_event_id, String |
#event_id ⇒ String
The unique ID of the Live server event.
11 |
# File 'lib/openai/models/live/session_closed_event.rb', line 11 required :event_id, String |
#reason ⇒ Symbol, OpenAI::Models::Live::SessionClosedEvent::Reason
Why the Live session ended: close_requested for an application close or hangup
request, expired for the session duration limit, content for a safety
filter, remote_hangup for a graceful remote disconnect, or connection_lost
for an unexpected primary or upstream disconnection.
20 |
# File 'lib/openai/models/live/session_closed_event.rb', line 20 required :reason, union: -> { OpenAI::Live::SessionClosedEvent::Reason } |
#session ⇒ OpenAI::Models::Live::SessionResource
The resolved Live session configuration and server-assigned session metadata.
26 |
# File 'lib/openai/models/live/session_closed_event.rb', line 26 required :session, -> { OpenAI::Live::SessionResource } |
#type ⇒ Symbol, :"session.closed"
The event type, always session.closed.
32 |
# File 'lib/openai/models/live/session_closed_event.rb', line 32 required :type, const: :"session.closed" |
#usage ⇒ OpenAI::Models::Live::SessionUsage
The final cumulative Live audio usage after session finalization.
38 |
# File 'lib/openai/models/live/session_closed_event.rb', line 38 required :usage, -> { OpenAI::Live::SessionUsage } |
Instance Method Details
#to_hash ⇒ {
38 |
# File 'sig/openai/models/live/session_closed_event.rbs', line 38
def to_hash: -> {
|