openai 0.128.1 → 0.130.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +1 -1
- data/lib/openai/models/live/fork_server_event.rb +75 -1
- data/lib/openai/models/live/media_session_config.rb +57 -1
- data/lib/openai/models/live/server_event.rb +75 -1
- data/lib/openai/models/live/session_accept_params.rb +3 -1
- data/lib/openai/models/live/session_config.rb +3 -0
- data/lib/openai/models/live/session_resource.rb +3 -0
- data/lib/openai/models/live/session_usage.rb +29 -7
- data/lib/openai/models/live/sideband_server_event.rb +75 -1
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/live/fork_server_event.rbi +122 -0
- data/rbi/openai/models/live/media_session_config.rbi +91 -3
- data/rbi/openai/models/live/server_event.rbi +122 -0
- data/rbi/openai/models/live/session_accept_params.rbi +1 -0
- data/rbi/openai/models/live/session_config.rbi +1 -0
- data/rbi/openai/models/live/session_resource.rbi +1 -0
- data/rbi/openai/models/live/session_usage.rbi +37 -9
- data/rbi/openai/models/live/sideband_server_event.rbi +122 -0
- data/sig/openai/models/live/fork_server_event.rbs +80 -0
- data/sig/openai/models/live/media_session_config.rbs +65 -4
- data/sig/openai/models/live/server_event.rbs +80 -0
- data/sig/openai/models/live/session_accept_params.rbs +2 -1
- data/sig/openai/models/live/session_config.rbs +2 -1
- data/sig/openai/models/live/session_resource.rbs +2 -1
- data/sig/openai/models/live/session_usage.rbs +38 -7
- data/sig/openai/models/live/sideband_server_event.rbs +80 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3fba7a2c7f876ae814d8285709ca3c8f15dad5c7d6900e0be147650e4752e692
|
|
4
|
+
data.tar.gz: 9232801d1477a0a54d5fefca64383b2a020448fed338817dd43e6c7ee5a9f4eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e252c4107d33b4afd812864970ee683823686b27249b2e111ded379b1c465b5632f7eb2bb481fbfb92fbdd0ee705c58ec642d3ca1347dbd31d0d1dffacaa94b0
|
|
7
|
+
data.tar.gz: 9cdf3ed4fe5cddb9a3a7c72c93a4730452ccb9e1cc886d873452a8a2bd7f88864bcadfe12073edc87fe39992b6ee0bf6ee6d7ebd144fcb2342e65373cc544921
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.130.0](https://github.com/openai/openai-ruby/compare/v0.129.0...v0.130.0) (2026-11-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** support Live WebRTC standby ([#1090](https://github.com/openai/openai-ruby/issues/1090)) ([ac0997c](https://github.com/openai/openai-ruby/commit/ac0997ca949572dbc6840ef1be4a0e989f4a5b13))
|
|
9
|
+
|
|
10
|
+
## [0.129.0](https://github.com/openai/openai-ruby/compare/v0.128.1...v0.129.0) (2026-11-19)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **api:** add gpt-live-1.1 to Live model choices ([#1089](https://github.com/openai/openai-ruby/issues/1089)) ([b54cfb3](https://github.com/openai/openai-ruby/commit/b54cfb3d8d272121012e29955e25ebf044f88545))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Chores
|
|
19
|
+
|
|
20
|
+
* **deps:** bump actions/create-github-app-token from 3.3.0 to 3.4.0 ([#1086](https://github.com/openai/openai-ruby/issues/1086)) ([0692e5e](https://github.com/openai/openai-ruby/commit/0692e5e2a41d953b0c4af3cf7b690335660aff9b))
|
|
21
|
+
* **deps:** bump ruby/setup-ruby from 1.341.0 to 1.342.0 ([#1085](https://github.com/openai/openai-ruby/issues/1085)) ([241a4fe](https://github.com/openai/openai-ruby/commit/241a4fe8eb1eaf30661543f4616dba84c2905030))
|
|
22
|
+
|
|
3
23
|
## [0.128.1](https://github.com/openai/openai-ruby/compare/v0.128.0...v0.128.1) (2026-11-18)
|
|
4
24
|
|
|
5
25
|
|
data/README.md
CHANGED
|
@@ -19,6 +19,12 @@ module OpenAI
|
|
|
19
19
|
# Returned when a Live session update is accepted. Contains the resolved session configuration after the update.
|
|
20
20
|
variant :"session.updated", -> { OpenAI::Live::SessionUpdatedEvent }
|
|
21
21
|
|
|
22
|
+
# Sent when speech resumes paused inference and it is ready for audio in a Live WebRTC session. Delivered to the sideband and, when permitted by its event settings, the data channel.
|
|
23
|
+
variant :"session.resumed", -> { OpenAI::Live::ForkServerEvent::SessionResumed }
|
|
24
|
+
|
|
25
|
+
# Sent when the idle timeout pauses inference in a Live WebRTC session. The WebRTC connection, sideband, and session ID persist. Delivered to the sideband and, when permitted by its event settings, the data channel.
|
|
26
|
+
variant :"session.paused", -> { OpenAI::Live::ForkServerEvent::SessionPaused }
|
|
27
|
+
|
|
22
28
|
# Acknowledges a session.input_audio.mute command. An independent input mute sends silence to the model and preserves sideband audio reflection. Fixture playback does not emit this event.
|
|
23
29
|
variant :"session.input_audio.muted", -> { OpenAI::Live::InputAudioMutedEvent }
|
|
24
30
|
|
|
@@ -97,6 +103,74 @@ module OpenAI
|
|
|
97
103
|
# An asynchronous outbound SIP setup failure. Delivered only to sideband observers.
|
|
98
104
|
variant :"transport.failed", -> { OpenAI::Live::ForkServerEvent::TransportFailed }
|
|
99
105
|
|
|
106
|
+
class SessionResumed < OpenAI::Internal::Type::BaseModel
|
|
107
|
+
# @!attribute event_id
|
|
108
|
+
# The unique ID of the Live server event.
|
|
109
|
+
#
|
|
110
|
+
# @return [String]
|
|
111
|
+
required :event_id, String
|
|
112
|
+
|
|
113
|
+
# @!attribute type
|
|
114
|
+
#
|
|
115
|
+
# @return [Symbol, :"session.resumed"]
|
|
116
|
+
required :type, const: :"session.resumed"
|
|
117
|
+
|
|
118
|
+
# @!attribute client_event_id
|
|
119
|
+
# The event_id of the client command associated with this server event, when
|
|
120
|
+
# supplied.
|
|
121
|
+
#
|
|
122
|
+
# @return [String, nil]
|
|
123
|
+
optional :client_event_id, String
|
|
124
|
+
|
|
125
|
+
# @!method initialize(event_id:, client_event_id: nil, type: :"session.resumed")
|
|
126
|
+
# Sent when speech resumes paused inference and it is ready for audio in a Live
|
|
127
|
+
# WebRTC session. Delivered to the sideband and, when permitted by its event
|
|
128
|
+
# settings, the data channel.
|
|
129
|
+
#
|
|
130
|
+
# @param event_id [String]
|
|
131
|
+
# The unique ID of the Live server event.
|
|
132
|
+
#
|
|
133
|
+
# @param client_event_id [String]
|
|
134
|
+
# The event_id of the client command associated with this server event, when
|
|
135
|
+
# supplied.
|
|
136
|
+
#
|
|
137
|
+
# @param type [Symbol, :"session.resumed"]
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
class SessionPaused < OpenAI::Internal::Type::BaseModel
|
|
141
|
+
# @!attribute event_id
|
|
142
|
+
# The unique ID of the Live server event.
|
|
143
|
+
#
|
|
144
|
+
# @return [String]
|
|
145
|
+
required :event_id, String
|
|
146
|
+
|
|
147
|
+
# @!attribute type
|
|
148
|
+
#
|
|
149
|
+
# @return [Symbol, :"session.paused"]
|
|
150
|
+
required :type, const: :"session.paused"
|
|
151
|
+
|
|
152
|
+
# @!attribute client_event_id
|
|
153
|
+
# The event_id of the client command associated with this server event, when
|
|
154
|
+
# supplied.
|
|
155
|
+
#
|
|
156
|
+
# @return [String, nil]
|
|
157
|
+
optional :client_event_id, String
|
|
158
|
+
|
|
159
|
+
# @!method initialize(event_id:, client_event_id: nil, type: :"session.paused")
|
|
160
|
+
# Sent when the idle timeout pauses inference in a Live WebRTC session. The WebRTC
|
|
161
|
+
# connection, sideband, and session ID persist. Delivered to the sideband and,
|
|
162
|
+
# when permitted by its event settings, the data channel.
|
|
163
|
+
#
|
|
164
|
+
# @param event_id [String]
|
|
165
|
+
# The unique ID of the Live server event.
|
|
166
|
+
#
|
|
167
|
+
# @param client_event_id [String]
|
|
168
|
+
# The event_id of the client command associated with this server event, when
|
|
169
|
+
# supplied.
|
|
170
|
+
#
|
|
171
|
+
# @param type [Symbol, :"session.paused"]
|
|
172
|
+
end
|
|
173
|
+
|
|
100
174
|
class SessionInputAudioAppend < OpenAI::Internal::Type::BaseModel
|
|
101
175
|
# @!attribute audio
|
|
102
176
|
# Base64-encoded raw mono PCM16LE at 24 kHz received from the primary transport,
|
|
@@ -354,7 +428,7 @@ module OpenAI
|
|
|
354
428
|
end
|
|
355
429
|
|
|
356
430
|
# @!method self.variants
|
|
357
|
-
# @return [Array(OpenAI::Models::Live::SessionStartedEvent, OpenAI::Models::Live::SessionUpdatedEvent, OpenAI::Models::Live::InputAudioMutedEvent, OpenAI::Models::Live::InputAudioUnmutedEvent, OpenAI::Models::Live::OutputAudioFixturePlayingEvent, OpenAI::Models::Live::OutputAudioFixturePlayedEvent, OpenAI::Models::Live::InstructionsAppendedEvent, OpenAI::Models::Live::ThinkingAppendedEvent, OpenAI::Models::Live::CommentaryAppendedEvent, OpenAI::Models::Live::ForkServerEvent::SessionInputAudioAppend, OpenAI::Models::Live::OutputAudioDeltaEvent, OpenAI::Models::Live::InputTranscriptDeltaEvent, OpenAI::Models::Live::OutputTranscriptDeltaEvent, OpenAI::Models::Live::DelegationCreatedEvent, OpenAI::Models::Live::DecisionEvent, OpenAI::Models::Live::DecisionItemCreatedEvent, OpenAI::Models::Live::DecisionItemDeletedEvent, OpenAI::Models::Live::ResponseEvent, OpenAI::Models::Live::SessionUsageUpdatedEvent, OpenAI::Models::Live::SessionClosedEvent, OpenAI::Models::Live::ErrorEvent, OpenAI::Models::Live::InfoEvent, OpenAI::Models::Live::ForkServerEvent::TransportDtmfReceived, OpenAI::Models::Live::ForkServerEvent::TransportDtmfSend, OpenAI::Models::Live::ForkServerEvent::TransportDtmfSent, OpenAI::Models::Live::ForkServerEvent::TransportRinging, OpenAI::Models::Live::ForkServerEvent::TransportAnswered, OpenAI::Models::Live::ForkServerEvent::TransportFailed)]
|
|
431
|
+
# @return [Array(OpenAI::Models::Live::SessionStartedEvent, OpenAI::Models::Live::SessionUpdatedEvent, OpenAI::Models::Live::ForkServerEvent::SessionResumed, OpenAI::Models::Live::ForkServerEvent::SessionPaused, OpenAI::Models::Live::InputAudioMutedEvent, OpenAI::Models::Live::InputAudioUnmutedEvent, OpenAI::Models::Live::OutputAudioFixturePlayingEvent, OpenAI::Models::Live::OutputAudioFixturePlayedEvent, OpenAI::Models::Live::InstructionsAppendedEvent, OpenAI::Models::Live::ThinkingAppendedEvent, OpenAI::Models::Live::CommentaryAppendedEvent, OpenAI::Models::Live::ForkServerEvent::SessionInputAudioAppend, OpenAI::Models::Live::OutputAudioDeltaEvent, OpenAI::Models::Live::InputTranscriptDeltaEvent, OpenAI::Models::Live::OutputTranscriptDeltaEvent, OpenAI::Models::Live::DelegationCreatedEvent, OpenAI::Models::Live::DecisionEvent, OpenAI::Models::Live::DecisionItemCreatedEvent, OpenAI::Models::Live::DecisionItemDeletedEvent, OpenAI::Models::Live::ResponseEvent, OpenAI::Models::Live::SessionUsageUpdatedEvent, OpenAI::Models::Live::SessionClosedEvent, OpenAI::Models::Live::ErrorEvent, OpenAI::Models::Live::InfoEvent, OpenAI::Models::Live::ForkServerEvent::TransportDtmfReceived, OpenAI::Models::Live::ForkServerEvent::TransportDtmfSend, OpenAI::Models::Live::ForkServerEvent::TransportDtmfSent, OpenAI::Models::Live::ForkServerEvent::TransportRinging, OpenAI::Models::Live::ForkServerEvent::TransportAnswered, OpenAI::Models::Live::ForkServerEvent::TransportFailed)]
|
|
358
432
|
end
|
|
359
433
|
end
|
|
360
434
|
end
|
|
@@ -33,6 +33,14 @@ module OpenAI
|
|
|
33
33
|
# @return [OpenAI::Models::Live::ClientDelegation, OpenAI::Models::Live::MediaSessionConfig::Delegation::Responses, OpenAI::Models::Live::MediaSessionConfig::Delegation::Decisions, nil]
|
|
34
34
|
optional :delegation, union: -> { OpenAI::Live::MediaSessionConfig::Delegation }, nil?: true
|
|
35
35
|
|
|
36
|
+
# @!attribute idle_timeout_s
|
|
37
|
+
# Whole seconds of inactivity after which a Live WebRTC session with a speech wake
|
|
38
|
+
# policy pauses inference. The connection and conversation history are retained.
|
|
39
|
+
# Omit to keep inference active until the session ends.
|
|
40
|
+
#
|
|
41
|
+
# @return [Integer, nil]
|
|
42
|
+
optional :idle_timeout_s, Integer
|
|
43
|
+
|
|
36
44
|
# @!attribute input
|
|
37
45
|
# Ordered text-only history supplied before startup. Supports developer, user, and
|
|
38
46
|
# assistant messages with one text part each; at most 128 messages and a
|
|
@@ -76,7 +84,14 @@ module OpenAI
|
|
|
76
84
|
# @return [Array<OpenAI::Models::Live::DecisionTrigger>, nil]
|
|
77
85
|
optional :triggers, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionTrigger] }
|
|
78
86
|
|
|
79
|
-
# @!
|
|
87
|
+
# @!attribute wake_policy
|
|
88
|
+
# Inference starts when the Live WebRTC session connects. After an idle pause,
|
|
89
|
+
# microphone speech resumes inference.
|
|
90
|
+
#
|
|
91
|
+
# @return [OpenAI::Models::Live::MediaSessionConfig::WakePolicy, nil]
|
|
92
|
+
optional :wake_policy, -> { OpenAI::Live::MediaSessionConfig::WakePolicy }
|
|
93
|
+
|
|
94
|
+
# @!method initialize(model:, audio: nil, client: nil, delegation: nil, idle_timeout_s: nil, input: nil, instructions: nil, safety_identifier: nil, store: nil, triggers: nil, wake_policy: nil)
|
|
80
95
|
# Startup configuration for a Live media session. Follow the
|
|
81
96
|
# [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting)
|
|
82
97
|
# when writing frontend instructions and the backend prompt under
|
|
@@ -99,6 +114,11 @@ module OpenAI
|
|
|
99
114
|
# application; use `responses` or `decisions` to delegate to the corresponding
|
|
100
115
|
# API.
|
|
101
116
|
#
|
|
117
|
+
# @param idle_timeout_s [Integer]
|
|
118
|
+
# Whole seconds of inactivity after which a Live WebRTC session with a speech wake
|
|
119
|
+
# policy pauses inference. The connection and conversation history are retained.
|
|
120
|
+
# Omit to keep inference active until the session ends.
|
|
121
|
+
#
|
|
102
122
|
# @param input [Array<OpenAI::Models::Live::InitialItem::Developer, OpenAI::Models::Live::InitialItem::User, OpenAI::Models::Live::InitialItem::Assistant>]
|
|
103
123
|
# Ordered text-only history supplied before startup. Supports developer, user, and
|
|
104
124
|
# assistant messages with one text part each; at most 128 messages and a
|
|
@@ -126,6 +146,10 @@ module OpenAI
|
|
|
126
146
|
# independently of delegation. On update, omit triggers to keep the current
|
|
127
147
|
# configuration, send a list to replace it, or send an empty list to disable
|
|
128
148
|
# triggers.
|
|
149
|
+
#
|
|
150
|
+
# @param wake_policy [OpenAI::Models::Live::MediaSessionConfig::WakePolicy]
|
|
151
|
+
# Inference starts when the Live WebRTC session connects. After an idle pause,
|
|
152
|
+
# microphone speech resumes inference.
|
|
129
153
|
|
|
130
154
|
# The Live model. Required in the session configuration for every transport; do
|
|
131
155
|
# not pass it as a URL query parameter.
|
|
@@ -138,6 +162,8 @@ module OpenAI
|
|
|
138
162
|
|
|
139
163
|
variant const: -> { OpenAI::Models::Live::MediaSessionConfig::Model::GPT_LIVE_1 }
|
|
140
164
|
|
|
165
|
+
variant const: -> { OpenAI::Models::Live::MediaSessionConfig::Model::GPT_LIVE_1_1 }
|
|
166
|
+
|
|
141
167
|
# @!method self.variants
|
|
142
168
|
# @return [Array(String, Symbol)]
|
|
143
169
|
|
|
@@ -148,6 +174,7 @@ module OpenAI
|
|
|
148
174
|
# @!group
|
|
149
175
|
|
|
150
176
|
GPT_LIVE_1 = :"gpt-live-1"
|
|
177
|
+
GPT_LIVE_1_1 = :"gpt-live-1.1"
|
|
151
178
|
|
|
152
179
|
# @!endgroup
|
|
153
180
|
end
|
|
@@ -305,6 +332,35 @@ module OpenAI
|
|
|
305
332
|
# @!method self.variants
|
|
306
333
|
# @return [Array(OpenAI::Models::Live::ClientDelegation, OpenAI::Models::Live::MediaSessionConfig::Delegation::Responses, OpenAI::Models::Live::MediaSessionConfig::Delegation::Decisions)]
|
|
307
334
|
end
|
|
335
|
+
|
|
336
|
+
# @see OpenAI::Models::Live::MediaSessionConfig#wake_policy
|
|
337
|
+
class WakePolicy < OpenAI::Internal::Type::BaseModel
|
|
338
|
+
# @!attribute type
|
|
339
|
+
# The wake policy type, always `speech`.
|
|
340
|
+
#
|
|
341
|
+
# @return [Symbol, :speech]
|
|
342
|
+
required :type, const: :speech
|
|
343
|
+
|
|
344
|
+
# @!attribute vad_threshold
|
|
345
|
+
# The speech detection threshold for resuming paused inference, from 0 to 1
|
|
346
|
+
# inclusive. Defaults to 0.5. Higher values require stronger evidence of speech.
|
|
347
|
+
# This setting is independent of active turn detection.
|
|
348
|
+
#
|
|
349
|
+
# @return [Float, nil]
|
|
350
|
+
optional :vad_threshold, Float
|
|
351
|
+
|
|
352
|
+
# @!method initialize(vad_threshold: nil, type: :speech)
|
|
353
|
+
# Inference starts when the Live WebRTC session connects. After an idle pause,
|
|
354
|
+
# microphone speech resumes inference.
|
|
355
|
+
#
|
|
356
|
+
# @param vad_threshold [Float]
|
|
357
|
+
# The speech detection threshold for resuming paused inference, from 0 to 1
|
|
358
|
+
# inclusive. Defaults to 0.5. Higher values require stronger evidence of speech.
|
|
359
|
+
# This setting is independent of active turn detection.
|
|
360
|
+
#
|
|
361
|
+
# @param type [Symbol, :speech]
|
|
362
|
+
# The wake policy type, always `speech`.
|
|
363
|
+
end
|
|
308
364
|
end
|
|
309
365
|
end
|
|
310
366
|
end
|
|
@@ -19,6 +19,12 @@ module OpenAI
|
|
|
19
19
|
# Returned when a Live session update is accepted. Contains the resolved session configuration after the update.
|
|
20
20
|
variant :"session.updated", -> { OpenAI::Live::SessionUpdatedEvent }
|
|
21
21
|
|
|
22
|
+
# Sent when speech resumes paused inference and it is ready for audio in a Live WebRTC session. Delivered to the sideband and, when permitted by its event settings, the data channel.
|
|
23
|
+
variant :"session.resumed", -> { OpenAI::Live::ServerEvent::SessionResumed }
|
|
24
|
+
|
|
25
|
+
# Sent when the idle timeout pauses inference in a Live WebRTC session. The WebRTC connection, sideband, and session ID persist. Delivered to the sideband and, when permitted by its event settings, the data channel.
|
|
26
|
+
variant :"session.paused", -> { OpenAI::Live::ServerEvent::SessionPaused }
|
|
27
|
+
|
|
22
28
|
# Acknowledges a session.input_audio.mute command. An independent input mute sends silence to the model and preserves sideband audio reflection. Fixture playback does not emit this event.
|
|
23
29
|
variant :"session.input_audio.muted", -> { OpenAI::Live::InputAudioMutedEvent }
|
|
24
30
|
|
|
@@ -97,6 +103,74 @@ module OpenAI
|
|
|
97
103
|
# An asynchronous outbound SIP setup failure. Delivered only to sideband observers.
|
|
98
104
|
variant :"transport.failed", -> { OpenAI::Live::ServerEvent::TransportFailed }
|
|
99
105
|
|
|
106
|
+
class SessionResumed < OpenAI::Internal::Type::BaseModel
|
|
107
|
+
# @!attribute event_id
|
|
108
|
+
# The unique ID of the Live server event.
|
|
109
|
+
#
|
|
110
|
+
# @return [String]
|
|
111
|
+
required :event_id, String
|
|
112
|
+
|
|
113
|
+
# @!attribute type
|
|
114
|
+
#
|
|
115
|
+
# @return [Symbol, :"session.resumed"]
|
|
116
|
+
required :type, const: :"session.resumed"
|
|
117
|
+
|
|
118
|
+
# @!attribute client_event_id
|
|
119
|
+
# The event_id of the client command associated with this server event, when
|
|
120
|
+
# supplied.
|
|
121
|
+
#
|
|
122
|
+
# @return [String, nil]
|
|
123
|
+
optional :client_event_id, String
|
|
124
|
+
|
|
125
|
+
# @!method initialize(event_id:, client_event_id: nil, type: :"session.resumed")
|
|
126
|
+
# Sent when speech resumes paused inference and it is ready for audio in a Live
|
|
127
|
+
# WebRTC session. Delivered to the sideband and, when permitted by its event
|
|
128
|
+
# settings, the data channel.
|
|
129
|
+
#
|
|
130
|
+
# @param event_id [String]
|
|
131
|
+
# The unique ID of the Live server event.
|
|
132
|
+
#
|
|
133
|
+
# @param client_event_id [String]
|
|
134
|
+
# The event_id of the client command associated with this server event, when
|
|
135
|
+
# supplied.
|
|
136
|
+
#
|
|
137
|
+
# @param type [Symbol, :"session.resumed"]
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
class SessionPaused < OpenAI::Internal::Type::BaseModel
|
|
141
|
+
# @!attribute event_id
|
|
142
|
+
# The unique ID of the Live server event.
|
|
143
|
+
#
|
|
144
|
+
# @return [String]
|
|
145
|
+
required :event_id, String
|
|
146
|
+
|
|
147
|
+
# @!attribute type
|
|
148
|
+
#
|
|
149
|
+
# @return [Symbol, :"session.paused"]
|
|
150
|
+
required :type, const: :"session.paused"
|
|
151
|
+
|
|
152
|
+
# @!attribute client_event_id
|
|
153
|
+
# The event_id of the client command associated with this server event, when
|
|
154
|
+
# supplied.
|
|
155
|
+
#
|
|
156
|
+
# @return [String, nil]
|
|
157
|
+
optional :client_event_id, String
|
|
158
|
+
|
|
159
|
+
# @!method initialize(event_id:, client_event_id: nil, type: :"session.paused")
|
|
160
|
+
# Sent when the idle timeout pauses inference in a Live WebRTC session. The WebRTC
|
|
161
|
+
# connection, sideband, and session ID persist. Delivered to the sideband and,
|
|
162
|
+
# when permitted by its event settings, the data channel.
|
|
163
|
+
#
|
|
164
|
+
# @param event_id [String]
|
|
165
|
+
# The unique ID of the Live server event.
|
|
166
|
+
#
|
|
167
|
+
# @param client_event_id [String]
|
|
168
|
+
# The event_id of the client command associated with this server event, when
|
|
169
|
+
# supplied.
|
|
170
|
+
#
|
|
171
|
+
# @param type [Symbol, :"session.paused"]
|
|
172
|
+
end
|
|
173
|
+
|
|
100
174
|
class SessionInputAudioAppend < OpenAI::Internal::Type::BaseModel
|
|
101
175
|
# @!attribute audio
|
|
102
176
|
# Base64-encoded raw mono PCM16LE at 24 kHz received from the primary transport,
|
|
@@ -354,7 +428,7 @@ module OpenAI
|
|
|
354
428
|
end
|
|
355
429
|
|
|
356
430
|
# @!method self.variants
|
|
357
|
-
# @return [Array(OpenAI::Models::Live::SessionStartedEvent, OpenAI::Models::Live::SessionUpdatedEvent, OpenAI::Models::Live::InputAudioMutedEvent, OpenAI::Models::Live::InputAudioUnmutedEvent, OpenAI::Models::Live::OutputAudioFixturePlayingEvent, OpenAI::Models::Live::OutputAudioFixturePlayedEvent, OpenAI::Models::Live::InstructionsAppendedEvent, OpenAI::Models::Live::ThinkingAppendedEvent, OpenAI::Models::Live::CommentaryAppendedEvent, OpenAI::Models::Live::ServerEvent::SessionInputAudioAppend, OpenAI::Models::Live::OutputAudioDeltaEvent, OpenAI::Models::Live::InputTranscriptDeltaEvent, OpenAI::Models::Live::OutputTranscriptDeltaEvent, OpenAI::Models::Live::DelegationCreatedEvent, OpenAI::Models::Live::DecisionEvent, OpenAI::Models::Live::DecisionItemCreatedEvent, OpenAI::Models::Live::DecisionItemDeletedEvent, OpenAI::Models::Live::ResponseEvent, OpenAI::Models::Live::SessionUsageUpdatedEvent, OpenAI::Models::Live::SessionClosedEvent, OpenAI::Models::Live::ErrorEvent, OpenAI::Models::Live::InfoEvent, OpenAI::Models::Live::ServerEvent::TransportDtmfReceived, OpenAI::Models::Live::ServerEvent::TransportDtmfSend, OpenAI::Models::Live::ServerEvent::TransportDtmfSent, OpenAI::Models::Live::ServerEvent::TransportRinging, OpenAI::Models::Live::ServerEvent::TransportAnswered, OpenAI::Models::Live::ServerEvent::TransportFailed)]
|
|
431
|
+
# @return [Array(OpenAI::Models::Live::SessionStartedEvent, OpenAI::Models::Live::SessionUpdatedEvent, OpenAI::Models::Live::ServerEvent::SessionResumed, OpenAI::Models::Live::ServerEvent::SessionPaused, OpenAI::Models::Live::InputAudioMutedEvent, OpenAI::Models::Live::InputAudioUnmutedEvent, OpenAI::Models::Live::OutputAudioFixturePlayingEvent, OpenAI::Models::Live::OutputAudioFixturePlayedEvent, OpenAI::Models::Live::InstructionsAppendedEvent, OpenAI::Models::Live::ThinkingAppendedEvent, OpenAI::Models::Live::CommentaryAppendedEvent, OpenAI::Models::Live::ServerEvent::SessionInputAudioAppend, OpenAI::Models::Live::OutputAudioDeltaEvent, OpenAI::Models::Live::InputTranscriptDeltaEvent, OpenAI::Models::Live::OutputTranscriptDeltaEvent, OpenAI::Models::Live::DelegationCreatedEvent, OpenAI::Models::Live::DecisionEvent, OpenAI::Models::Live::DecisionItemCreatedEvent, OpenAI::Models::Live::DecisionItemDeletedEvent, OpenAI::Models::Live::ResponseEvent, OpenAI::Models::Live::SessionUsageUpdatedEvent, OpenAI::Models::Live::SessionClosedEvent, OpenAI::Models::Live::ErrorEvent, OpenAI::Models::Live::InfoEvent, OpenAI::Models::Live::ServerEvent::TransportDtmfReceived, OpenAI::Models::Live::ServerEvent::TransportDtmfSend, OpenAI::Models::Live::ServerEvent::TransportDtmfSent, OpenAI::Models::Live::ServerEvent::TransportRinging, OpenAI::Models::Live::ServerEvent::TransportAnswered, OpenAI::Models::Live::ServerEvent::TransportFailed)]
|
|
358
432
|
end
|
|
359
433
|
end
|
|
360
434
|
end
|
|
@@ -163,9 +163,10 @@ module OpenAI
|
|
|
163
163
|
|
|
164
164
|
variant String
|
|
165
165
|
|
|
166
|
-
# The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.
|
|
167
166
|
variant const: -> { OpenAI::Models::Live::SessionAcceptParams::Session::Model::GPT_LIVE_1 }
|
|
168
167
|
|
|
168
|
+
variant const: -> { OpenAI::Models::Live::SessionAcceptParams::Session::Model::GPT_LIVE_1_1 }
|
|
169
|
+
|
|
169
170
|
# @!method self.variants
|
|
170
171
|
# @return [Array(String, Symbol)]
|
|
171
172
|
|
|
@@ -176,6 +177,7 @@ module OpenAI
|
|
|
176
177
|
# @!group
|
|
177
178
|
|
|
178
179
|
GPT_LIVE_1 = :"gpt-live-1"
|
|
180
|
+
GPT_LIVE_1_1 = :"gpt-live-1.1"
|
|
179
181
|
|
|
180
182
|
# @!endgroup
|
|
181
183
|
end
|
|
@@ -138,6 +138,8 @@ module OpenAI
|
|
|
138
138
|
|
|
139
139
|
variant const: -> { OpenAI::Models::Live::SessionConfig::Model::GPT_LIVE_1 }
|
|
140
140
|
|
|
141
|
+
variant const: -> { OpenAI::Models::Live::SessionConfig::Model::GPT_LIVE_1_1 }
|
|
142
|
+
|
|
141
143
|
# @!method self.variants
|
|
142
144
|
# @return [Array(String, Symbol)]
|
|
143
145
|
|
|
@@ -148,6 +150,7 @@ module OpenAI
|
|
|
148
150
|
# @!group
|
|
149
151
|
|
|
150
152
|
GPT_LIVE_1 = :"gpt-live-1"
|
|
153
|
+
GPT_LIVE_1_1 = :"gpt-live-1.1"
|
|
151
154
|
|
|
152
155
|
# @!endgroup
|
|
153
156
|
end
|
|
@@ -170,6 +170,8 @@ module OpenAI
|
|
|
170
170
|
|
|
171
171
|
variant const: -> { OpenAI::Models::Live::SessionResource::Model::GPT_LIVE_1 }
|
|
172
172
|
|
|
173
|
+
variant const: -> { OpenAI::Models::Live::SessionResource::Model::GPT_LIVE_1_1 }
|
|
174
|
+
|
|
173
175
|
# @!method self.variants
|
|
174
176
|
# @return [Array(String, Symbol)]
|
|
175
177
|
|
|
@@ -180,6 +182,7 @@ module OpenAI
|
|
|
180
182
|
# @!group
|
|
181
183
|
|
|
182
184
|
GPT_LIVE_1 = :"gpt-live-1"
|
|
185
|
+
GPT_LIVE_1_1 = :"gpt-live-1.1"
|
|
183
186
|
|
|
184
187
|
# @!endgroup
|
|
185
188
|
end
|
|
@@ -5,19 +5,41 @@ module OpenAI
|
|
|
5
5
|
module Live
|
|
6
6
|
class SessionUsage < OpenAI::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute seconds
|
|
8
|
-
# The cumulative
|
|
9
|
-
#
|
|
8
|
+
# The cumulative billable duration in whole seconds. When present, the active and
|
|
9
|
+
# paused breakdown adds up to this total.
|
|
10
10
|
#
|
|
11
11
|
# @return [Float]
|
|
12
12
|
required :seconds, Float
|
|
13
13
|
|
|
14
|
-
# @!
|
|
15
|
-
#
|
|
16
|
-
#
|
|
14
|
+
# @!attribute active_seconds
|
|
15
|
+
# The remaining billable seconds attributed to active audio and any unused prepaid
|
|
16
|
+
# duration.
|
|
17
|
+
#
|
|
18
|
+
# @return [Integer, nil]
|
|
19
|
+
optional :active_seconds, Integer
|
|
20
|
+
|
|
21
|
+
# @!attribute paused_seconds
|
|
22
|
+
# Billable time attributed to paused inference at the configured rate, rounded
|
|
23
|
+
# down to whole seconds.
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :paused_seconds, Integer
|
|
27
|
+
|
|
28
|
+
# @!method initialize(seconds:, active_seconds: nil, paused_seconds: nil)
|
|
29
|
+
# Cumulative billable duration for a Live session. Eligible WebRTC sessions also
|
|
30
|
+
# report the active and paused breakdown. Do not sum values across usage events.
|
|
17
31
|
#
|
|
18
32
|
# @param seconds [Float]
|
|
19
|
-
# The cumulative
|
|
20
|
-
#
|
|
33
|
+
# The cumulative billable duration in whole seconds. When present, the active and
|
|
34
|
+
# paused breakdown adds up to this total.
|
|
35
|
+
#
|
|
36
|
+
# @param active_seconds [Integer]
|
|
37
|
+
# The remaining billable seconds attributed to active audio and any unused prepaid
|
|
38
|
+
# duration.
|
|
39
|
+
#
|
|
40
|
+
# @param paused_seconds [Integer]
|
|
41
|
+
# Billable time attributed to paused inference at the configured rate, rounded
|
|
42
|
+
# down to whole seconds.
|
|
21
43
|
end
|
|
22
44
|
end
|
|
23
45
|
end
|
|
@@ -16,6 +16,12 @@ module OpenAI
|
|
|
16
16
|
# Returned when a Live session update is accepted. Contains the resolved session configuration after the update.
|
|
17
17
|
variant :"session.updated", -> { OpenAI::Live::SessionUpdatedEvent }
|
|
18
18
|
|
|
19
|
+
# Sent when speech resumes paused inference and it is ready for audio in a Live WebRTC session. Delivered to the sideband and, when permitted by its event settings, the data channel.
|
|
20
|
+
variant :"session.resumed", -> { OpenAI::Live::SidebandServerEvent::SessionResumed }
|
|
21
|
+
|
|
22
|
+
# Sent when the idle timeout pauses inference in a Live WebRTC session. The WebRTC connection, sideband, and session ID persist. Delivered to the sideband and, when permitted by its event settings, the data channel.
|
|
23
|
+
variant :"session.paused", -> { OpenAI::Live::SidebandServerEvent::SessionPaused }
|
|
24
|
+
|
|
19
25
|
# Acknowledges a session.input_audio.mute command. An independent input mute sends silence to the model and preserves sideband audio reflection. Fixture playback does not emit this event.
|
|
20
26
|
variant :"session.input_audio.muted", -> { OpenAI::Live::InputAudioMutedEvent }
|
|
21
27
|
|
|
@@ -94,6 +100,74 @@ module OpenAI
|
|
|
94
100
|
# An asynchronous outbound SIP setup failure. Delivered only to sideband observers.
|
|
95
101
|
variant :"transport.failed", -> { OpenAI::Live::SidebandServerEvent::TransportFailed }
|
|
96
102
|
|
|
103
|
+
class SessionResumed < OpenAI::Internal::Type::BaseModel
|
|
104
|
+
# @!attribute event_id
|
|
105
|
+
# The unique ID of the Live server event.
|
|
106
|
+
#
|
|
107
|
+
# @return [String]
|
|
108
|
+
required :event_id, String
|
|
109
|
+
|
|
110
|
+
# @!attribute type
|
|
111
|
+
#
|
|
112
|
+
# @return [Symbol, :"session.resumed"]
|
|
113
|
+
required :type, const: :"session.resumed"
|
|
114
|
+
|
|
115
|
+
# @!attribute client_event_id
|
|
116
|
+
# The event_id of the client command associated with this server event, when
|
|
117
|
+
# supplied.
|
|
118
|
+
#
|
|
119
|
+
# @return [String, nil]
|
|
120
|
+
optional :client_event_id, String
|
|
121
|
+
|
|
122
|
+
# @!method initialize(event_id:, client_event_id: nil, type: :"session.resumed")
|
|
123
|
+
# Sent when speech resumes paused inference and it is ready for audio in a Live
|
|
124
|
+
# WebRTC session. Delivered to the sideband and, when permitted by its event
|
|
125
|
+
# settings, the data channel.
|
|
126
|
+
#
|
|
127
|
+
# @param event_id [String]
|
|
128
|
+
# The unique ID of the Live server event.
|
|
129
|
+
#
|
|
130
|
+
# @param client_event_id [String]
|
|
131
|
+
# The event_id of the client command associated with this server event, when
|
|
132
|
+
# supplied.
|
|
133
|
+
#
|
|
134
|
+
# @param type [Symbol, :"session.resumed"]
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
class SessionPaused < OpenAI::Internal::Type::BaseModel
|
|
138
|
+
# @!attribute event_id
|
|
139
|
+
# The unique ID of the Live server event.
|
|
140
|
+
#
|
|
141
|
+
# @return [String]
|
|
142
|
+
required :event_id, String
|
|
143
|
+
|
|
144
|
+
# @!attribute type
|
|
145
|
+
#
|
|
146
|
+
# @return [Symbol, :"session.paused"]
|
|
147
|
+
required :type, const: :"session.paused"
|
|
148
|
+
|
|
149
|
+
# @!attribute client_event_id
|
|
150
|
+
# The event_id of the client command associated with this server event, when
|
|
151
|
+
# supplied.
|
|
152
|
+
#
|
|
153
|
+
# @return [String, nil]
|
|
154
|
+
optional :client_event_id, String
|
|
155
|
+
|
|
156
|
+
# @!method initialize(event_id:, client_event_id: nil, type: :"session.paused")
|
|
157
|
+
# Sent when the idle timeout pauses inference in a Live WebRTC session. The WebRTC
|
|
158
|
+
# connection, sideband, and session ID persist. Delivered to the sideband and,
|
|
159
|
+
# when permitted by its event settings, the data channel.
|
|
160
|
+
#
|
|
161
|
+
# @param event_id [String]
|
|
162
|
+
# The unique ID of the Live server event.
|
|
163
|
+
#
|
|
164
|
+
# @param client_event_id [String]
|
|
165
|
+
# The event_id of the client command associated with this server event, when
|
|
166
|
+
# supplied.
|
|
167
|
+
#
|
|
168
|
+
# @param type [Symbol, :"session.paused"]
|
|
169
|
+
end
|
|
170
|
+
|
|
97
171
|
class SessionInputAudioAppend < OpenAI::Internal::Type::BaseModel
|
|
98
172
|
# @!attribute audio
|
|
99
173
|
# Base64-encoded raw mono PCM16LE at 24 kHz received from the primary transport,
|
|
@@ -351,7 +425,7 @@ module OpenAI
|
|
|
351
425
|
end
|
|
352
426
|
|
|
353
427
|
# @!method self.variants
|
|
354
|
-
# @return [Array(OpenAI::Models::Live::SessionStartedEvent, OpenAI::Models::Live::SessionUpdatedEvent, OpenAI::Models::Live::InputAudioMutedEvent, OpenAI::Models::Live::InputAudioUnmutedEvent, OpenAI::Models::Live::OutputAudioFixturePlayingEvent, OpenAI::Models::Live::OutputAudioFixturePlayedEvent, OpenAI::Models::Live::InstructionsAppendedEvent, OpenAI::Models::Live::ThinkingAppendedEvent, OpenAI::Models::Live::CommentaryAppendedEvent, OpenAI::Models::Live::InputTranscriptDeltaEvent, OpenAI::Models::Live::OutputTranscriptDeltaEvent, OpenAI::Models::Live::DelegationCreatedEvent, OpenAI::Models::Live::DecisionEvent, OpenAI::Models::Live::DecisionItemCreatedEvent, OpenAI::Models::Live::DecisionItemDeletedEvent, OpenAI::Models::Live::ResponseEvent, OpenAI::Models::Live::SessionUsageUpdatedEvent, OpenAI::Models::Live::SessionClosedEvent, OpenAI::Models::Live::ErrorEvent, OpenAI::Models::Live::InfoEvent, OpenAI::Models::Live::SidebandServerEvent::SessionInputAudioAppend, OpenAI::Models::Live::OutputAudioDeltaEvent, OpenAI::Models::Live::SidebandServerEvent::TransportDtmfReceived, OpenAI::Models::Live::SidebandServerEvent::TransportDtmfSend, OpenAI::Models::Live::SidebandServerEvent::TransportDtmfSent, OpenAI::Models::Live::SidebandServerEvent::TransportRinging, OpenAI::Models::Live::SidebandServerEvent::TransportAnswered, OpenAI::Models::Live::SidebandServerEvent::TransportFailed)]
|
|
428
|
+
# @return [Array(OpenAI::Models::Live::SessionStartedEvent, OpenAI::Models::Live::SessionUpdatedEvent, OpenAI::Models::Live::SidebandServerEvent::SessionResumed, OpenAI::Models::Live::SidebandServerEvent::SessionPaused, OpenAI::Models::Live::InputAudioMutedEvent, OpenAI::Models::Live::InputAudioUnmutedEvent, OpenAI::Models::Live::OutputAudioFixturePlayingEvent, OpenAI::Models::Live::OutputAudioFixturePlayedEvent, OpenAI::Models::Live::InstructionsAppendedEvent, OpenAI::Models::Live::ThinkingAppendedEvent, OpenAI::Models::Live::CommentaryAppendedEvent, OpenAI::Models::Live::InputTranscriptDeltaEvent, OpenAI::Models::Live::OutputTranscriptDeltaEvent, OpenAI::Models::Live::DelegationCreatedEvent, OpenAI::Models::Live::DecisionEvent, OpenAI::Models::Live::DecisionItemCreatedEvent, OpenAI::Models::Live::DecisionItemDeletedEvent, OpenAI::Models::Live::ResponseEvent, OpenAI::Models::Live::SessionUsageUpdatedEvent, OpenAI::Models::Live::SessionClosedEvent, OpenAI::Models::Live::ErrorEvent, OpenAI::Models::Live::InfoEvent, OpenAI::Models::Live::SidebandServerEvent::SessionInputAudioAppend, OpenAI::Models::Live::OutputAudioDeltaEvent, OpenAI::Models::Live::SidebandServerEvent::TransportDtmfReceived, OpenAI::Models::Live::SidebandServerEvent::TransportDtmfSend, OpenAI::Models::Live::SidebandServerEvent::TransportDtmfSent, OpenAI::Models::Live::SidebandServerEvent::TransportRinging, OpenAI::Models::Live::SidebandServerEvent::TransportAnswered, OpenAI::Models::Live::SidebandServerEvent::TransportFailed)]
|
|
355
429
|
end
|
|
356
430
|
end
|
|
357
431
|
end
|
data/lib/openai/version.rb
CHANGED