Class: OpenAI::Models::Realtime::SessionUpdateEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/session_update_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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(session: , event_id: nil, type: :"session.update") ⇒ Object

Send this event to update the session’s default configuration. The client may send this event at any time to update any field, except for ‘voice`. However, note that once a session has been initialized with a particular `model`, it can’t be changed to another model using `session.update`.

When the server receives a ‘session.update`, it will respond with a `session.updated` event showing the full, effective configuration. Only the fields that are present are updated. To clear a field like `instructions`, pass an empty string.

Parameters:

  • session (OpenAI::Models::Realtime::RealtimeSessionCreateRequest) (defaults to: )

    Realtime session object configuration.

  • event_id (String) (defaults to: nil)

    Optional client-generated ID used to identify this event.

  • type (Symbol, :"session.update") (defaults to: :"session.update")

    The event type, must be ‘session.update`.



# File 'lib/openai/models/realtime/session_update_event.rb', line 25

Instance Attribute Details

#event_idString?

Optional client-generated ID used to identify this event.

Returns:

  • (String, nil)


23
# File 'lib/openai/models/realtime/session_update_event.rb', line 23

optional :event_id, String

#sessionOpenAI::Models::Realtime::RealtimeSessionCreateRequest

Realtime session object configuration.



11
# File 'lib/openai/models/realtime/session_update_event.rb', line 11

required :session, -> { OpenAI::Realtime::RealtimeSessionCreateRequest }

#typeSymbol, :"session.update"

The event type, must be ‘session.update`.

Returns:



17
# File 'lib/openai/models/realtime/session_update_event.rb', line 17

required :type, const: :"session.update"