Class: OpenAI::Models::Realtime::RealtimeTranslationClientSecretCreateRequest

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb,
sig/openai/models/realtime/realtime_translation_client_secret_create_request.rbs

Defined Under Namespace

Classes: ExpiresAfter

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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(session:, expires_after: nil) ⇒ Object

Parameters:

  • session —

    Realtime translation session configuration. Translation sessions stream source audio in and translated audio plus transcript deltas out continuously.

  • expires_after (defaults to: nil) —

    Configuration for the client secret expiration. Expiration refers to the time after which a client secret will no longer be valid for creating sessions. The session itself may continue after that time once started. A secret can be used to create multiple sessions until it expires.



# File 'lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb', line 26

Instance Attribute Details

#expires_after ⇒ OpenAI::Realtime::RealtimeTranslationClientSecretCreateRequest::ExpiresAfter?

Configuration for the client secret expiration. Expiration refers to the time after which a client secret will no longer be valid for creating sessions. The session itself may continue after that time once started. A secret can be used to create multiple sessions until it expires.

Returns:

  • (OpenAI::Realtime::RealtimeTranslationClientSecretCreateRequest::ExpiresAfter, nil)


21
22
23
24
# File 'lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb', line 21

optional(
  :expires_after,
  -> { OpenAI::Realtime::RealtimeTranslationClientSecretCreateRequest::ExpiresAfter }
)

#session ⇒ OpenAI::Realtime::RealtimeTranslationSessionCreateRequest

Realtime translation session configuration. Translation sessions stream source audio in and translated audio plus transcript deltas out continuously.

Returns:

  • (OpenAI::Realtime::RealtimeTranslationSessionCreateRequest)


12
# File 'lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb', line 12

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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


42
# File 'sig/openai/models/realtime/realtime_translation_client_secret_create_request.rbs', line 42

def to_hash: -> {