Class: OpenAI::Models::Live::MediaSessionConfig
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Live::MediaSessionConfig
- Defined in:
- lib/openai/models/live/media_session_config.rb,
sig/openai/models/live/media_session_config.rbs
Defined Under Namespace
Modules: Delegation, Model Classes: Audio
Instance Attribute Summary collapse
-
#audio ⇒ OpenAI::Models::Live::MediaSessionConfig::Audio?
Startup audio configuration.
-
#client ⇒ OpenAI::Models::Live::ClientConfig?
Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session.
-
#delegation ⇒ OpenAI::Models::Live::ClientDelegation, ...
Who handles tasks delegated by the Live model.
-
#input ⇒ Array<OpenAI::Models::Live::InitialItem::Developer, OpenAI::Models::Live::InitialItem::User, OpenAI::Models::Live::InitialItem::Assistant>?
Ordered text-only history supplied before startup.
-
#instructions ⇒ String?
Frontend instructions for voice, conversation, interruptions, and when to delegate.
-
#model ⇒ String, ...
The Live model.
-
#store ⇒ Boolean?
Whether to store the session for later forking and recording download.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(model:, audio: nil, client: nil, delegation: nil, input: nil, instructions: nil, store: nil) ⇒ Object
constructor
Startup configuration for a Live media session.
- #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(model:, audio: nil, client: nil, delegation: nil, input: nil, instructions: nil, store: nil) ⇒ Object
Startup configuration for a Live media session. Follow the Live prompting guide when writing frontend instructions and the backend prompt under delegation.responses.instructions.
|
|
# File 'lib/openai/models/live/media_session_config.rb', line 62
|
Instance Attribute Details
#audio ⇒ OpenAI::Models::Live::MediaSessionConfig::Audio?
Startup audio configuration. WebRTC and SIP negotiate their audio format on the media transport.
19 |
# File 'lib/openai/models/live/media_session_config.rb', line 19 optional :audio, -> { OpenAI::Live::MediaSessionConfig::Audio } |
#client ⇒ OpenAI::Models::Live::ClientConfig?
Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.
26 |
# File 'lib/openai/models/live/media_session_config.rb', line 26 optional :client, -> { OpenAI::Live::ClientConfig } |
#delegation ⇒ OpenAI::Models::Live::ClientDelegation, ...
Who handles tasks delegated by the Live model. Omitted or null selects your
application; use responses to let the API manage a Responses backend.
33 |
# File 'lib/openai/models/live/media_session_config.rb', line 33 optional :delegation, union: -> { OpenAI::Live::MediaSessionConfig::Delegation }, nil?: true |
#input ⇒ Array<OpenAI::Models::Live::InitialItem::Developer, OpenAI::Models::Live::InitialItem::User, OpenAI::Models::Live::InitialItem::Assistant>?
Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total.
41 |
# File 'lib/openai/models/live/media_session_config.rb', line 41 optional :input, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Live::InitialItem] } |
#instructions ⇒ String?
Frontend instructions for voice, conversation, interruptions, and when to delegate. Start with the Live prompting guide; put business rules and tool workflows in a separate backend prompt. Limited to 16,384 client-supplied tokens. Omitted or blank instructions use server defaults. Immutable after startup.
53 |
# File 'lib/openai/models/live/media_session_config.rb', line 53 optional :instructions, String, nil?: true |
#model ⇒ String, ...
The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.
12 |
# File 'lib/openai/models/live/media_session_config.rb', line 12 required :model, union: -> { OpenAI::Live::MediaSessionConfig::Model } |
Class Method Details
.variants ⇒ Array(String, Symbol, OpenAI::Models::Live::BuiltInVoice, OpenAI::Models::Live::CustomVoice)
|
|
# File 'lib/openai/models/live/media_session_config.rb', line 175
|
Instance Method Details
#to_hash ⇒ {
52 |
# File 'sig/openai/models/live/media_session_config.rbs', line 52
def to_hash: -> {
|