openai 0.71.0 → 0.73.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 +18 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/organization_spend_limit.rb +151 -0
- data/lib/openai/models/admin/organization/organization_spend_limit_deleted.rb +33 -0
- data/lib/openai/models/admin/organization/projects/project_spend_limit.rb +155 -0
- data/lib/openai/models/admin/organization/projects/project_spend_limit_deleted.rb +35 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_delete_params.rb +26 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_retrieve_params.rb +26 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_update_params.rb +77 -0
- data/lib/openai/models/admin/organization/spend_limit_delete_params.rb +18 -0
- data/lib/openai/models/admin/organization/spend_limit_retrieve_params.rb +18 -0
- data/lib/openai/models/admin/organization/spend_limit_update_params.rb +67 -0
- data/lib/openai/models/audio/transcription.rb +10 -1
- data/lib/openai/models/audio/transcription_create_params.rb +24 -5
- data/lib/openai/models/audio/transcription_language.rb +20 -0
- data/lib/openai/models/audio/transcription_text_done_event.rb +10 -1
- data/lib/openai/models/audio_model.rb +1 -0
- data/lib/openai/models/beta/beta_response.rb +12 -6
- data/lib/openai/models/beta/beta_response_error.rb +1 -0
- data/lib/openai/models/beta/beta_response_text_config.rb +4 -2
- data/lib/openai/models/beta/beta_responses_client_event.rb +12 -6
- data/lib/openai/models/beta/response_create_params.rb +12 -6
- data/lib/openai/models/beta/responses/input_token_count_params.rb +12 -4
- data/lib/openai/models/chat/completion_create_params.rb +8 -6
- data/lib/openai/models/realtime/audio_transcription.rb +35 -8
- data/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb +10 -1
- data/lib/openai/models/reasoning.rb +8 -2
- data/lib/openai/models/responses/input_token_count_params.rb +4 -2
- data/lib/openai/models/responses/response.rb +4 -4
- data/lib/openai/models/responses/response_create_params.rb +4 -4
- data/lib/openai/models/responses/response_error.rb +1 -0
- data/lib/openai/models/responses/response_text_config.rb +4 -2
- data/lib/openai/models/responses/responses_client_event.rb +4 -4
- data/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb +121 -0
- data/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb +6 -3
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +9 -2
- data/lib/openai/resources/admin/organization/projects/spend_limit.rb +95 -0
- data/lib/openai/resources/admin/organization/projects.rb +4 -0
- data/lib/openai/resources/admin/organization/spend_limit.rb +86 -0
- data/lib/openai/resources/admin/organization.rb +4 -0
- data/lib/openai/resources/audio/transcriptions.rb +12 -4
- data/lib/openai/resources/beta/responses.rb +4 -4
- data/lib/openai/resources/chat/completions.rb +4 -4
- data/lib/openai/resources/responses.rb +4 -4
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +14 -0
- data/rbi/openai/models/admin/organization/organization_spend_limit.rbi +278 -0
- data/rbi/openai/models/admin/organization/organization_spend_limit_deleted.rbi +48 -0
- data/rbi/openai/models/admin/organization/projects/project_spend_limit.rbi +280 -0
- data/rbi/openai/models/admin/organization/projects/project_spend_limit_deleted.rbi +49 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_delete_params.rbi +44 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbi +44 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_update_params.rbi +149 -0
- data/rbi/openai/models/admin/organization/spend_limit_delete_params.rbi +34 -0
- data/rbi/openai/models/admin/organization/spend_limit_retrieve_params.rbi +34 -0
- data/rbi/openai/models/admin/organization/spend_limit_update_params.rbi +141 -0
- data/rbi/openai/models/audio/transcription.rbi +19 -0
- data/rbi/openai/models/audio/transcription_create_params.rbi +31 -3
- data/rbi/openai/models/audio/transcription_language.rbi +33 -0
- data/rbi/openai/models/audio/transcription_text_done_event.rbi +19 -0
- data/rbi/openai/models/audio_model.rbi +2 -0
- data/rbi/openai/models/beta/beta_response.rbi +18 -15
- data/rbi/openai/models/beta/beta_response_error.rbi +5 -0
- data/rbi/openai/models/beta/beta_response_text_config.rbi +6 -3
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +18 -15
- data/rbi/openai/models/beta/response_create_params.rbi +18 -15
- data/rbi/openai/models/beta/responses/input_token_count_params.rbi +18 -6
- data/rbi/openai/models/chat/completion_create_params.rbi +12 -15
- data/rbi/openai/models/realtime/audio_transcription.rbi +50 -9
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbi +19 -0
- data/rbi/openai/models/reasoning.rbi +12 -3
- data/rbi/openai/models/responses/input_token_count_params.rbi +6 -3
- data/rbi/openai/models/responses/response.rbi +6 -12
- data/rbi/openai/models/responses/response_create_params.rbi +6 -12
- data/rbi/openai/models/responses/response_error.rbi +5 -0
- data/rbi/openai/models/responses/response_text_config.rbi +6 -3
- data/rbi/openai/models/responses/responses_client_event.rbi +6 -12
- data/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi +222 -0
- data/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi +7 -3
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +1 -0
- data/rbi/openai/resources/admin/organization/projects/spend_limit.rbi +78 -0
- data/rbi/openai/resources/admin/organization/projects.rbi +7 -0
- data/rbi/openai/resources/admin/organization/spend_limit.rbi +57 -0
- data/rbi/openai/resources/admin/organization.rbi +3 -0
- data/rbi/openai/resources/audio/transcriptions.rbi +20 -2
- data/rbi/openai/resources/beta/responses.rbi +4 -4
- data/rbi/openai/resources/chat/completions.rbi +8 -6
- data/rbi/openai/resources/responses.rbi +4 -4
- data/rbi/openai/resources/webhooks.rbi +1 -0
- data/sig/openai/models/admin/organization/organization_spend_limit.rbs +94 -0
- data/sig/openai/models/admin/organization/organization_spend_limit_deleted.rbs +28 -0
- data/sig/openai/models/admin/organization/projects/project_spend_limit.rbs +96 -0
- data/sig/openai/models/admin/organization/projects/project_spend_limit_deleted.rbs +30 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_delete_params.rbs +29 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbs +29 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs +67 -0
- data/sig/openai/models/admin/organization/spend_limit_delete_params.rbs +19 -0
- data/sig/openai/models/admin/organization/spend_limit_retrieve_params.rbs +19 -0
- data/sig/openai/models/admin/organization/spend_limit_update_params.rbs +60 -0
- data/sig/openai/models/audio/transcription.rbs +9 -0
- data/sig/openai/models/audio/transcription_create_params.rbs +14 -0
- data/sig/openai/models/audio/transcription_language.rbs +15 -0
- data/sig/openai/models/audio/transcription_text_done_event.rbs +9 -0
- data/sig/openai/models/audio_model.rbs +2 -0
- data/sig/openai/models/beta/beta_response.rbs +8 -12
- data/sig/openai/models/beta/beta_response_error.rbs +2 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +8 -12
- data/sig/openai/models/beta/response_create_params.rbs +8 -12
- data/sig/openai/models/chat/completion_create_params.rbs +8 -12
- data/sig/openai/models/realtime/audio_transcription.rbs +18 -0
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbs +9 -0
- data/sig/openai/models/responses/response.rbs +8 -12
- data/sig/openai/models/responses/response_create_params.rbs +8 -12
- data/sig/openai/models/responses/response_error.rbs +2 -0
- data/sig/openai/models/responses/responses_client_event.rbs +8 -12
- data/sig/openai/models/webhooks/live_call_incoming_webhook_event.rbs +90 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +1 -0
- data/sig/openai/resources/admin/organization/projects/spend_limit.rbs +31 -0
- data/sig/openai/resources/admin/organization/projects.rbs +2 -0
- data/sig/openai/resources/admin/organization/spend_limit.rbs +26 -0
- data/sig/openai/resources/admin/organization.rbs +2 -0
- data/sig/openai/resources/audio/transcriptions.rbs +4 -0
- data/sig/openai/resources/beta/responses.rbs +4 -4
- data/sig/openai/resources/chat/completions.rbs +4 -4
- data/sig/openai/resources/responses.rbs +4 -4
- data/sig/openai/resources/webhooks.rbs +1 -0
- metadata +44 -2
|
@@ -199,10 +199,7 @@ module OpenAI
|
|
|
199
199
|
# hit rates. Replaces the `user` field.
|
|
200
200
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
201
201
|
sig { returns(T.nilable(String)) }
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
sig { params(prompt_cache_key: String).void }
|
|
205
|
-
attr_writer :prompt_cache_key
|
|
202
|
+
attr_accessor :prompt_cache_key
|
|
206
203
|
|
|
207
204
|
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
208
205
|
# default, OpenAI automatically chooses one implicit cache breakpoint. You can add
|
|
@@ -273,10 +270,7 @@ module OpenAI
|
|
|
273
270
|
# identifying information.
|
|
274
271
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
275
272
|
sig { returns(T.nilable(String)) }
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
sig { params(safety_identifier: String).void }
|
|
279
|
-
attr_writer :safety_identifier
|
|
273
|
+
attr_accessor :safety_identifier
|
|
280
274
|
|
|
281
275
|
# Specifies the processing type used for serving the request.
|
|
282
276
|
#
|
|
@@ -545,7 +539,7 @@ module OpenAI
|
|
|
545
539
|
parallel_tool_calls: T.nilable(T::Boolean),
|
|
546
540
|
previous_response_id: T.nilable(String),
|
|
547
541
|
prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash),
|
|
548
|
-
prompt_cache_key: String,
|
|
542
|
+
prompt_cache_key: T.nilable(String),
|
|
549
543
|
prompt_cache_options:
|
|
550
544
|
OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::OrHash,
|
|
551
545
|
prompt_cache_retention:
|
|
@@ -553,7 +547,7 @@ module OpenAI
|
|
|
553
547
|
OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::OrSymbol
|
|
554
548
|
),
|
|
555
549
|
reasoning: T.nilable(OpenAI::Reasoning::OrHash),
|
|
556
|
-
safety_identifier: String,
|
|
550
|
+
safety_identifier: T.nilable(String),
|
|
557
551
|
service_tier:
|
|
558
552
|
T.nilable(
|
|
559
553
|
OpenAI::Responses::ResponsesClientEvent::ServiceTier::OrSymbol
|
|
@@ -860,7 +854,7 @@ module OpenAI
|
|
|
860
854
|
parallel_tool_calls: T.nilable(T::Boolean),
|
|
861
855
|
previous_response_id: T.nilable(String),
|
|
862
856
|
prompt: T.nilable(OpenAI::Responses::ResponsePrompt),
|
|
863
|
-
prompt_cache_key: String,
|
|
857
|
+
prompt_cache_key: T.nilable(String),
|
|
864
858
|
prompt_cache_options:
|
|
865
859
|
OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions,
|
|
866
860
|
prompt_cache_retention:
|
|
@@ -868,7 +862,7 @@ module OpenAI
|
|
|
868
862
|
OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::OrSymbol
|
|
869
863
|
),
|
|
870
864
|
reasoning: T.nilable(OpenAI::Reasoning),
|
|
871
|
-
safety_identifier: String,
|
|
865
|
+
safety_identifier: T.nilable(String),
|
|
872
866
|
service_tier:
|
|
873
867
|
T.nilable(
|
|
874
868
|
OpenAI::Responses::ResponsesClientEvent::ServiceTier::OrSymbol
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Webhooks
|
|
6
|
+
class LiveCallIncomingWebhookEvent < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent,
|
|
11
|
+
OpenAI::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The unique ID of the event.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :id
|
|
18
|
+
|
|
19
|
+
# The Unix timestamp (in seconds) of when the event was created.
|
|
20
|
+
sig { returns(Integer) }
|
|
21
|
+
attr_accessor :created_at
|
|
22
|
+
|
|
23
|
+
# Event data payload.
|
|
24
|
+
sig { returns(OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data) }
|
|
25
|
+
attr_reader :data
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
data: OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::OrHash
|
|
30
|
+
).void
|
|
31
|
+
end
|
|
32
|
+
attr_writer :data
|
|
33
|
+
|
|
34
|
+
# The type of the event. Always `live.call.incoming`.
|
|
35
|
+
sig { returns(Symbol) }
|
|
36
|
+
attr_accessor :type
|
|
37
|
+
|
|
38
|
+
# The object of the event. Always `event`.
|
|
39
|
+
sig do
|
|
40
|
+
returns(
|
|
41
|
+
T.nilable(
|
|
42
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::TaggedSymbol
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
attr_reader :object
|
|
47
|
+
|
|
48
|
+
sig do
|
|
49
|
+
params(
|
|
50
|
+
object:
|
|
51
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::OrSymbol
|
|
52
|
+
).void
|
|
53
|
+
end
|
|
54
|
+
attr_writer :object
|
|
55
|
+
|
|
56
|
+
# Sent when an incoming API SIP session is available for Live acceptance. The same
|
|
57
|
+
# pending session can also emit `realtime.call.incoming`; the first successful
|
|
58
|
+
# Realtime or Live accept endpoint selects the runtime surface.
|
|
59
|
+
sig do
|
|
60
|
+
params(
|
|
61
|
+
id: String,
|
|
62
|
+
created_at: Integer,
|
|
63
|
+
data: OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::OrHash,
|
|
64
|
+
object:
|
|
65
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::OrSymbol,
|
|
66
|
+
type: Symbol
|
|
67
|
+
).returns(T.attached_class)
|
|
68
|
+
end
|
|
69
|
+
def self.new(
|
|
70
|
+
# The unique ID of the event.
|
|
71
|
+
id:,
|
|
72
|
+
# The Unix timestamp (in seconds) of when the event was created.
|
|
73
|
+
created_at:,
|
|
74
|
+
# Event data payload.
|
|
75
|
+
data:,
|
|
76
|
+
# The object of the event. Always `event`.
|
|
77
|
+
object: nil,
|
|
78
|
+
# The type of the event. Always `live.call.incoming`.
|
|
79
|
+
type: :"live.call.incoming"
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
sig do
|
|
84
|
+
override.returns(
|
|
85
|
+
{
|
|
86
|
+
id: String,
|
|
87
|
+
created_at: Integer,
|
|
88
|
+
data: OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data,
|
|
89
|
+
type: Symbol,
|
|
90
|
+
object:
|
|
91
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::TaggedSymbol
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
def to_hash
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
|
99
|
+
OrHash =
|
|
100
|
+
T.type_alias do
|
|
101
|
+
T.any(
|
|
102
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data,
|
|
103
|
+
OpenAI::Internal::AnyHash
|
|
104
|
+
)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
|
|
108
|
+
# as `call_id` in `realtime.call.incoming`.
|
|
109
|
+
sig { returns(String) }
|
|
110
|
+
attr_accessor :session_id
|
|
111
|
+
|
|
112
|
+
# Headers from the SIP Invite.
|
|
113
|
+
sig do
|
|
114
|
+
returns(
|
|
115
|
+
T::Array[
|
|
116
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader
|
|
117
|
+
]
|
|
118
|
+
)
|
|
119
|
+
end
|
|
120
|
+
attr_accessor :sip_headers
|
|
121
|
+
|
|
122
|
+
# Event data payload.
|
|
123
|
+
sig do
|
|
124
|
+
params(
|
|
125
|
+
session_id: String,
|
|
126
|
+
sip_headers:
|
|
127
|
+
T::Array[
|
|
128
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader::OrHash
|
|
129
|
+
]
|
|
130
|
+
).returns(T.attached_class)
|
|
131
|
+
end
|
|
132
|
+
def self.new(
|
|
133
|
+
# The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
|
|
134
|
+
# as `call_id` in `realtime.call.incoming`.
|
|
135
|
+
session_id:,
|
|
136
|
+
# Headers from the SIP Invite.
|
|
137
|
+
sip_headers:
|
|
138
|
+
)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
sig do
|
|
142
|
+
override.returns(
|
|
143
|
+
{
|
|
144
|
+
session_id: String,
|
|
145
|
+
sip_headers:
|
|
146
|
+
T::Array[
|
|
147
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
end
|
|
152
|
+
def to_hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
class SipHeader < OpenAI::Internal::Type::BaseModel
|
|
156
|
+
OrHash =
|
|
157
|
+
T.type_alias do
|
|
158
|
+
T.any(
|
|
159
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Data::SipHeader,
|
|
160
|
+
OpenAI::Internal::AnyHash
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Name of the SIP Header.
|
|
165
|
+
sig { returns(String) }
|
|
166
|
+
attr_accessor :name
|
|
167
|
+
|
|
168
|
+
# Value of the SIP Header.
|
|
169
|
+
sig { returns(String) }
|
|
170
|
+
attr_accessor :value
|
|
171
|
+
|
|
172
|
+
# A header from the SIP Invite.
|
|
173
|
+
sig do
|
|
174
|
+
params(name: String, value: String).returns(T.attached_class)
|
|
175
|
+
end
|
|
176
|
+
def self.new(
|
|
177
|
+
# Name of the SIP Header.
|
|
178
|
+
name:,
|
|
179
|
+
# Value of the SIP Header.
|
|
180
|
+
value:
|
|
181
|
+
)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
sig { override.returns({ name: String, value: String }) }
|
|
185
|
+
def to_hash
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# The object of the event. Always `event`.
|
|
191
|
+
module Object
|
|
192
|
+
extend OpenAI::Internal::Type::Enum
|
|
193
|
+
|
|
194
|
+
TaggedSymbol =
|
|
195
|
+
T.type_alias do
|
|
196
|
+
T.all(
|
|
197
|
+
Symbol,
|
|
198
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object
|
|
199
|
+
)
|
|
200
|
+
end
|
|
201
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
202
|
+
|
|
203
|
+
EVENT =
|
|
204
|
+
T.let(
|
|
205
|
+
:event,
|
|
206
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::TaggedSymbol
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
sig do
|
|
210
|
+
override.returns(
|
|
211
|
+
T::Array[
|
|
212
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent::Object::TaggedSymbol
|
|
213
|
+
]
|
|
214
|
+
)
|
|
215
|
+
end
|
|
216
|
+
def self.values
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
@@ -56,7 +56,9 @@ module OpenAI
|
|
|
56
56
|
end
|
|
57
57
|
attr_writer :object
|
|
58
58
|
|
|
59
|
-
# Sent when
|
|
59
|
+
# Sent when an incoming API SIP session is available for Realtime acceptance. The
|
|
60
|
+
# same pending session can also emit `live.call.incoming`; the first successful
|
|
61
|
+
# Realtime or Live accept endpoint selects the runtime surface.
|
|
60
62
|
sig do
|
|
61
63
|
params(
|
|
62
64
|
id: String,
|
|
@@ -106,7 +108,8 @@ module OpenAI
|
|
|
106
108
|
)
|
|
107
109
|
end
|
|
108
110
|
|
|
109
|
-
# The
|
|
111
|
+
# The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
|
|
112
|
+
# as `session_id` in `live.call.incoming`.
|
|
110
113
|
sig { returns(String) }
|
|
111
114
|
attr_accessor :call_id
|
|
112
115
|
|
|
@@ -131,7 +134,8 @@ module OpenAI
|
|
|
131
134
|
).returns(T.attached_class)
|
|
132
135
|
end
|
|
133
136
|
def self.new(
|
|
134
|
-
# The
|
|
137
|
+
# The Transceiver `rtc_...` ID of the pending SIP session. The same value appears
|
|
138
|
+
# as `session_id` in `live.call.incoming`.
|
|
135
139
|
call_id:,
|
|
136
140
|
# Headers from the SIP Invite.
|
|
137
141
|
sip_headers:
|
|
@@ -20,6 +20,7 @@ module OpenAI
|
|
|
20
20
|
OpenAI::Webhooks::FineTuningJobCancelledWebhookEvent,
|
|
21
21
|
OpenAI::Webhooks::FineTuningJobFailedWebhookEvent,
|
|
22
22
|
OpenAI::Webhooks::FineTuningJobSucceededWebhookEvent,
|
|
23
|
+
OpenAI::Webhooks::LiveCallIncomingWebhookEvent,
|
|
23
24
|
OpenAI::Webhooks::RealtimeCallIncomingWebhookEvent,
|
|
24
25
|
OpenAI::Webhooks::ResponseCancelledWebhookEvent,
|
|
25
26
|
OpenAI::Webhooks::ResponseCompletedWebhookEvent,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Resources
|
|
5
|
+
class Admin
|
|
6
|
+
class Organization
|
|
7
|
+
class Projects
|
|
8
|
+
class SpendLimit
|
|
9
|
+
# Get a project's hard spend limit.
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
project_id: String,
|
|
13
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
14
|
+
).returns(
|
|
15
|
+
OpenAI::Admin::Organization::Projects::ProjectSpendLimit
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
def retrieve(
|
|
19
|
+
# The ID of the project whose hard spend limit is being managed.
|
|
20
|
+
project_id,
|
|
21
|
+
request_options: {}
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Create or replace a project's hard spend limit.
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
project_id: String,
|
|
29
|
+
currency:
|
|
30
|
+
OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::Currency::OrSymbol,
|
|
31
|
+
interval:
|
|
32
|
+
OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::Interval::OrSymbol,
|
|
33
|
+
threshold_amount: Integer,
|
|
34
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
35
|
+
).returns(
|
|
36
|
+
OpenAI::Admin::Organization::Projects::ProjectSpendLimit
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
def update(
|
|
40
|
+
# The ID of the project whose hard spend limit is being managed.
|
|
41
|
+
project_id,
|
|
42
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
43
|
+
currency:,
|
|
44
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
45
|
+
# `month` is supported.
|
|
46
|
+
interval:,
|
|
47
|
+
# The hard spend limit amount, in cents.
|
|
48
|
+
threshold_amount:,
|
|
49
|
+
request_options: {}
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Delete a project's hard spend limit.
|
|
54
|
+
sig do
|
|
55
|
+
params(
|
|
56
|
+
project_id: String,
|
|
57
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
58
|
+
).returns(
|
|
59
|
+
OpenAI::Admin::Organization::Projects::ProjectSpendLimitDeleted
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
def delete(
|
|
63
|
+
# The ID of the project whose hard spend limit is being managed.
|
|
64
|
+
project_id,
|
|
65
|
+
request_options: {}
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @api private
|
|
70
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
|
71
|
+
def self.new(client:)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -60,6 +60,13 @@ module OpenAI
|
|
|
60
60
|
end
|
|
61
61
|
attr_reader :data_retention
|
|
62
62
|
|
|
63
|
+
sig do
|
|
64
|
+
returns(
|
|
65
|
+
OpenAI::Resources::Admin::Organization::Projects::SpendLimit
|
|
66
|
+
)
|
|
67
|
+
end
|
|
68
|
+
attr_reader :spend_limit
|
|
69
|
+
|
|
63
70
|
sig do
|
|
64
71
|
returns(
|
|
65
72
|
OpenAI::Resources::Admin::Organization::Projects::SpendAlerts
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Resources
|
|
5
|
+
class Admin
|
|
6
|
+
class Organization
|
|
7
|
+
class SpendLimit
|
|
8
|
+
# Get the organization's hard spend limit.
|
|
9
|
+
sig do
|
|
10
|
+
params(request_options: OpenAI::RequestOptions::OrHash).returns(
|
|
11
|
+
OpenAI::Admin::Organization::OrganizationSpendLimit
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
def retrieve(request_options: {})
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Create or replace the organization's hard spend limit.
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
currency:
|
|
21
|
+
OpenAI::Admin::Organization::SpendLimitUpdateParams::Currency::OrSymbol,
|
|
22
|
+
interval:
|
|
23
|
+
OpenAI::Admin::Organization::SpendLimitUpdateParams::Interval::OrSymbol,
|
|
24
|
+
threshold_amount: Integer,
|
|
25
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
26
|
+
).returns(OpenAI::Admin::Organization::OrganizationSpendLimit)
|
|
27
|
+
end
|
|
28
|
+
def update(
|
|
29
|
+
# The currency for the threshold amount. Currently, only `USD` is supported.
|
|
30
|
+
currency:,
|
|
31
|
+
# The time interval for evaluating spend against the threshold. Currently, only
|
|
32
|
+
# `month` is supported.
|
|
33
|
+
interval:,
|
|
34
|
+
# The hard spend limit amount, in cents.
|
|
35
|
+
threshold_amount:,
|
|
36
|
+
request_options: {}
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Delete the organization's hard spend limit.
|
|
41
|
+
sig do
|
|
42
|
+
params(request_options: OpenAI::RequestOptions::OrHash).returns(
|
|
43
|
+
OpenAI::Admin::Organization::OrganizationSpendLimitDeleted
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
def delete(request_options: {})
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# @api private
|
|
50
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
|
51
|
+
def self.new(client:)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -29,6 +29,9 @@ module OpenAI
|
|
|
29
29
|
sig { returns(OpenAI::Resources::Admin::Organization::DataRetention) }
|
|
30
30
|
attr_reader :data_retention
|
|
31
31
|
|
|
32
|
+
sig { returns(OpenAI::Resources::Admin::Organization::SpendLimit) }
|
|
33
|
+
attr_reader :spend_limit
|
|
34
|
+
|
|
32
35
|
sig { returns(OpenAI::Resources::Admin::Organization::SpendAlerts) }
|
|
33
36
|
attr_reader :spend_alerts
|
|
34
37
|
|
|
@@ -24,9 +24,11 @@ module OpenAI
|
|
|
24
24
|
)
|
|
25
25
|
),
|
|
26
26
|
include: T::Array[OpenAI::Audio::TranscriptionInclude::OrSymbol],
|
|
27
|
+
keywords: T::Array[String],
|
|
27
28
|
known_speaker_names: T::Array[String],
|
|
28
29
|
known_speaker_references: T::Array[String],
|
|
29
30
|
language: String,
|
|
31
|
+
languages: T::Array[String],
|
|
30
32
|
prompt: String,
|
|
31
33
|
response_format: OpenAI::AudioResponseFormat::OrSymbol,
|
|
32
34
|
temperature: Float,
|
|
@@ -44,7 +46,7 @@ module OpenAI
|
|
|
44
46
|
# The audio file object (not file name) to transcribe, in one of these formats:
|
|
45
47
|
# flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
46
48
|
file:,
|
|
47
|
-
# ID of the model to use. The options are `gpt-4o-transcribe`,
|
|
49
|
+
# ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`,
|
|
48
50
|
# `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
|
|
49
51
|
# (which is powered by our open source Whisper V2 model), and
|
|
50
52
|
# `gpt-4o-transcribe-diarize`.
|
|
@@ -63,6 +65,9 @@ module OpenAI
|
|
|
63
65
|
# `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
|
|
64
66
|
# not supported when using `gpt-4o-transcribe-diarize`.
|
|
65
67
|
include: nil,
|
|
68
|
+
# Words or phrases to guide transcription of the input audio. Supported by
|
|
69
|
+
# `gpt-transcribe`.
|
|
70
|
+
keywords: nil,
|
|
66
71
|
# Optional list of speaker names that correspond to the audio samples provided in
|
|
67
72
|
# `known_speaker_references[]`. Each entry should be a short identifier (for
|
|
68
73
|
# example `customer` or `agent`). Up to 4 speakers are supported.
|
|
@@ -77,6 +82,10 @@ module OpenAI
|
|
|
77
82
|
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
|
|
78
83
|
# format will improve accuracy and latency.
|
|
79
84
|
language: nil,
|
|
85
|
+
# Possible languages of the input audio, in
|
|
86
|
+
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
87
|
+
# Supported by `gpt-transcribe`.
|
|
88
|
+
languages: nil,
|
|
80
89
|
# An optional text to guide the model's style or continue a previous audio
|
|
81
90
|
# segment. The
|
|
82
91
|
# [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
|
|
@@ -128,9 +137,11 @@ module OpenAI
|
|
|
128
137
|
)
|
|
129
138
|
),
|
|
130
139
|
include: T::Array[OpenAI::Audio::TranscriptionInclude::OrSymbol],
|
|
140
|
+
keywords: T::Array[String],
|
|
131
141
|
known_speaker_names: T::Array[String],
|
|
132
142
|
known_speaker_references: T::Array[String],
|
|
133
143
|
language: String,
|
|
144
|
+
languages: T::Array[String],
|
|
134
145
|
prompt: String,
|
|
135
146
|
response_format: OpenAI::AudioResponseFormat::OrSymbol,
|
|
136
147
|
temperature: Float,
|
|
@@ -150,7 +161,7 @@ module OpenAI
|
|
|
150
161
|
# The audio file object (not file name) to transcribe, in one of these formats:
|
|
151
162
|
# flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
152
163
|
file:,
|
|
153
|
-
# ID of the model to use. The options are `gpt-4o-transcribe`,
|
|
164
|
+
# ID of the model to use. The options are `gpt-transcribe`, `gpt-4o-transcribe`,
|
|
154
165
|
# `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
|
|
155
166
|
# (which is powered by our open source Whisper V2 model), and
|
|
156
167
|
# `gpt-4o-transcribe-diarize`.
|
|
@@ -169,6 +180,9 @@ module OpenAI
|
|
|
169
180
|
# `gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
|
|
170
181
|
# not supported when using `gpt-4o-transcribe-diarize`.
|
|
171
182
|
include: nil,
|
|
183
|
+
# Words or phrases to guide transcription of the input audio. Supported by
|
|
184
|
+
# `gpt-transcribe`.
|
|
185
|
+
keywords: nil,
|
|
172
186
|
# Optional list of speaker names that correspond to the audio samples provided in
|
|
173
187
|
# `known_speaker_references[]`. Each entry should be a short identifier (for
|
|
174
188
|
# example `customer` or `agent`). Up to 4 speakers are supported.
|
|
@@ -183,6 +197,10 @@ module OpenAI
|
|
|
183
197
|
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
|
|
184
198
|
# format will improve accuracy and latency.
|
|
185
199
|
language: nil,
|
|
200
|
+
# Possible languages of the input audio, in
|
|
201
|
+
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
202
|
+
# Supported by `gpt-transcribe`.
|
|
203
|
+
languages: nil,
|
|
186
204
|
# An optional text to guide the model's style or continue a previous audio
|
|
187
205
|
# segment. The
|
|
188
206
|
# [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
|
|
@@ -60,7 +60,7 @@ module OpenAI
|
|
|
60
60
|
parallel_tool_calls: T.nilable(T::Boolean),
|
|
61
61
|
previous_response_id: T.nilable(String),
|
|
62
62
|
prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash),
|
|
63
|
-
prompt_cache_key: String,
|
|
63
|
+
prompt_cache_key: T.nilable(String),
|
|
64
64
|
prompt_cache_options:
|
|
65
65
|
OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::OrHash,
|
|
66
66
|
prompt_cache_retention:
|
|
@@ -69,7 +69,7 @@ module OpenAI
|
|
|
69
69
|
),
|
|
70
70
|
reasoning:
|
|
71
71
|
T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning::OrHash),
|
|
72
|
-
safety_identifier: String,
|
|
72
|
+
safety_identifier: T.nilable(String),
|
|
73
73
|
service_tier:
|
|
74
74
|
T.nilable(
|
|
75
75
|
OpenAI::Beta::ResponseCreateParams::ServiceTier::OrSymbol
|
|
@@ -399,7 +399,7 @@ module OpenAI
|
|
|
399
399
|
parallel_tool_calls: T.nilable(T::Boolean),
|
|
400
400
|
previous_response_id: T.nilable(String),
|
|
401
401
|
prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash),
|
|
402
|
-
prompt_cache_key: String,
|
|
402
|
+
prompt_cache_key: T.nilable(String),
|
|
403
403
|
prompt_cache_options:
|
|
404
404
|
OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::OrHash,
|
|
405
405
|
prompt_cache_retention:
|
|
@@ -408,7 +408,7 @@ module OpenAI
|
|
|
408
408
|
),
|
|
409
409
|
reasoning:
|
|
410
410
|
T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning::OrHash),
|
|
411
|
-
safety_identifier: String,
|
|
411
|
+
safety_identifier: T.nilable(String),
|
|
412
412
|
service_tier:
|
|
413
413
|
T.nilable(
|
|
414
414
|
OpenAI::Beta::ResponseCreateParams::ServiceTier::OrSymbol
|
|
@@ -76,7 +76,7 @@ module OpenAI
|
|
|
76
76
|
prediction:
|
|
77
77
|
T.nilable(OpenAI::Chat::ChatCompletionPredictionContent::OrHash),
|
|
78
78
|
presence_penalty: T.nilable(Float),
|
|
79
|
-
prompt_cache_key: String,
|
|
79
|
+
prompt_cache_key: T.nilable(String),
|
|
80
80
|
prompt_cache_options:
|
|
81
81
|
OpenAI::Chat::CompletionCreateParams::PromptCacheOptions::OrHash,
|
|
82
82
|
prompt_cache_retention:
|
|
@@ -91,7 +91,7 @@ module OpenAI
|
|
|
91
91
|
OpenAI::StructuredOutput::JsonSchemaConverter,
|
|
92
92
|
OpenAI::ResponseFormatJSONObject::OrHash
|
|
93
93
|
),
|
|
94
|
-
safety_identifier: String,
|
|
94
|
+
safety_identifier: T.nilable(String),
|
|
95
95
|
seed: T.nilable(Integer),
|
|
96
96
|
service_tier:
|
|
97
97
|
T.nilable(
|
|
@@ -363,7 +363,8 @@ module OpenAI
|
|
|
363
363
|
user: nil,
|
|
364
364
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
365
365
|
# more concise responses, while higher values will result in more verbose
|
|
366
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
366
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
367
|
+
# default is `medium`.
|
|
367
368
|
verbosity: nil,
|
|
368
369
|
# This tool searches the web for relevant results to use in a response. Learn more
|
|
369
370
|
# about the
|
|
@@ -441,7 +442,7 @@ module OpenAI
|
|
|
441
442
|
prediction:
|
|
442
443
|
T.nilable(OpenAI::Chat::ChatCompletionPredictionContent::OrHash),
|
|
443
444
|
presence_penalty: T.nilable(Float),
|
|
444
|
-
prompt_cache_key: String,
|
|
445
|
+
prompt_cache_key: T.nilable(String),
|
|
445
446
|
prompt_cache_options:
|
|
446
447
|
OpenAI::Chat::CompletionCreateParams::PromptCacheOptions::OrHash,
|
|
447
448
|
prompt_cache_retention:
|
|
@@ -455,7 +456,7 @@ module OpenAI
|
|
|
455
456
|
OpenAI::ResponseFormatJSONSchema::OrHash,
|
|
456
457
|
OpenAI::ResponseFormatJSONObject::OrHash
|
|
457
458
|
),
|
|
458
|
-
safety_identifier: String,
|
|
459
|
+
safety_identifier: T.nilable(String),
|
|
459
460
|
seed: T.nilable(Integer),
|
|
460
461
|
service_tier:
|
|
461
462
|
T.nilable(
|
|
@@ -726,7 +727,8 @@ module OpenAI
|
|
|
726
727
|
user: nil,
|
|
727
728
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
728
729
|
# more concise responses, while higher values will result in more verbose
|
|
729
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
730
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
731
|
+
# default is `medium`.
|
|
730
732
|
verbosity: nil,
|
|
731
733
|
# This tool searches the web for relevant results to use in a response. Learn more
|
|
732
734
|
# about the
|