Class: OpenAI::Models::Live::SessionConfig
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Live::SessionConfig
- Defined in:
- lib/openai/models/live/session_config.rb,
sig/openai/models/live/session_config.rbs
Defined Under Namespace
Modules: Delegation, Model Classes: Audio
Instance Attribute Summary collapse
-
#audio ⇒ OpenAI::Live::SessionConfig::Audio?
Startup audio configuration.
-
#client ⇒ OpenAI::Live::ClientConfig?
Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session.
-
#delegation ⇒ OpenAI::Models::Live::SessionConfig::delegation?
Who handles tasks delegated by the Live model.
-
#input ⇒ ::Array[OpenAI::Models::Live::initial_item]?
Ordered text-only history supplied before startup.
-
#instructions ⇒ String?
Frontend instructions for voice, conversation, interruptions, and when to delegate.
-
#model ⇒ OpenAI::Models::Live::SessionConfig::model
The Live model.
-
#safety_identifier ⇒ String?
A stable identifier for your end user, used for safety monitoring and abuse detection.
-
#store ⇒ Boolean?
Whether to store the session for later forking and recording download.
-
#triggers ⇒ ::Array[OpenAI::Live::DecisionTrigger]?
At most one Decisions trigger per transcript event type.
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, safety_identifier: nil, store: nil, triggers: nil) ⇒ SessionConfig
constructor
A new instance of SessionConfig.
- #to_hash ⇒ { model: OpenAI::Models::Live::SessionConfig::model, ?audio: OpenAI::Live::SessionConfig::Audio, ?client: OpenAI::Live::ClientConfig, ?delegation: OpenAI::Models::Live::SessionConfig::delegation?, ?input: ::Array[OpenAI::Models::Live::initial_item], ?instructions: String?, ?safety_identifier: String?, ?store: bool, ?triggers: ::Array[OpenAI::Live::DecisionTrigger] }
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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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, safety_identifier: nil, store: nil, triggers: nil) ⇒ SessionConfig
Returns a new instance of SessionConfig.
|
|
# File 'lib/openai/models/live/session_config.rb', line 80
|
Instance Attribute Details
#audio ⇒ OpenAI::Live::SessionConfig::Audio?
Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.
20 |
# File 'lib/openai/models/live/session_config.rb', line 20 optional :audio, -> { OpenAI::Live::SessionConfig::Audio } |
#client ⇒ OpenAI::Live::ClientConfig?
Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.
27 |
# File 'lib/openai/models/live/session_config.rb', line 27 optional :client, -> { OpenAI::Live::ClientConfig } |
#delegation ⇒ OpenAI::Models::Live::SessionConfig::delegation?
Who handles tasks delegated by the Live model. Omitted or null selects your
application; use responses or decisions to delegate to the corresponding
API.
35 |
# File 'lib/openai/models/live/session_config.rb', line 35 optional :delegation, union: -> { OpenAI::Live::SessionConfig::Delegation }, nil?: true |
#input ⇒ ::Array[OpenAI::Models::Live::initial_item]?
Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and a configured rendered-token limit (8,192 by default).
43 |
# File 'lib/openai/models/live/session_config.rb', line 43 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.
55 |
# File 'lib/openai/models/live/session_config.rb', line 55 optional :instructions, String, nil?: true |
#model ⇒ OpenAI::Models::Live::SessionConfig::model
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/session_config.rb', line 12 required :model, union: -> { OpenAI::Live::SessionConfig::Model } |
#safety_identifier ⇒ String?
A stable identifier for your end user, used for safety monitoring and abuse detection.
62 |
# File 'lib/openai/models/live/session_config.rb', line 62 optional :safety_identifier, String, nil?: true |
#store ⇒ Boolean?
Whether to store the session for later forking and recording download. Defaults to false for new sessions.
69 |
# File 'lib/openai/models/live/session_config.rb', line 69 optional :store, OpenAI::Internal::Type::Boolean |
#triggers ⇒ ::Array[OpenAI::Live::DecisionTrigger]?
At most one Decisions trigger per transcript event type. Triggers run independently of delegation. On update, omit triggers to keep the current configuration, send a list to replace it, or send an empty list to disable triggers.
78 |
# File 'lib/openai/models/live/session_config.rb', line 78 optional :triggers, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionTrigger] } |
Class Method Details
.variants ⇒ Array(String, Symbol, OpenAI::Models::Live::BuiltInVoice, OpenAI::Models::Live::CustomVoice)
|
|
# File 'lib/openai/models/live/session_config.rb', line 215
|
Instance Method Details
#to_hash ⇒ { model: OpenAI::Models::Live::SessionConfig::model, ?audio: OpenAI::Live::SessionConfig::Audio, ?client: OpenAI::Live::ClientConfig, ?delegation: OpenAI::Models::Live::SessionConfig::delegation?, ?input: ::Array[OpenAI::Models::Live::initial_item], ?instructions: String?, ?safety_identifier: String?, ?store: bool, ?triggers: ::Array[OpenAI::Live::DecisionTrigger] }
143 144 145 146 147 148 149 150 151 152 153 |
# File 'sig/openai/models/live/session_config.rbs', line 143
def to_hash: -> {
model: OpenAI::Models::Live::SessionConfig::model,
?audio: OpenAI::Live::SessionConfig::Audio,
?client: OpenAI::Live::ClientConfig,
?delegation: OpenAI::Models::Live::SessionConfig::delegation?,
?input: ::Array[OpenAI::Models::Live::initial_item],
?instructions: String?,
?safety_identifier: String?,
?store: bool,
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
}
|