openai 0.109.0 → 0.111.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 +24 -0
- data/README.md +1 -1
- data/lib/openai/models/audio/voice_delete_params.rb +22 -0
- data/lib/openai/models/audio/voice_deleted.rb +38 -0
- data/lib/openai/models/decision_create_params.rb +798 -28
- data/lib/openai/models/decision_input_json.rb +45 -0
- data/lib/openai/models/decision_input_message.rb +304 -48
- data/lib/openai/models/decision_input_part.rb +4 -1
- data/lib/openai/models/decision_question_input_image.rb +54 -0
- data/lib/openai/models/decision_question_input_part.rb +23 -0
- data/lib/openai/models/decision_question_input_text.rb +21 -0
- data/lib/openai/models/live/decision_trigger.rb +82 -9
- data/lib/openai/models/live/decisions_delegation_config.rb +82 -9
- data/lib/openai/models/live/decisions_delegation_update_config.rb +82 -9
- data/lib/openai/models.rb +8 -0
- data/lib/openai/resources/admin/organization/projects/api_keys.rb +5 -3
- data/lib/openai/resources/audio/voices.rb +29 -0
- data/lib/openai/resources/decisions.rb +5 -6
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +6 -0
- data/rbi/openai/models/audio/voice_delete_params.rbi +53 -0
- data/rbi/openai/models/audio/voice_deleted.rbi +67 -0
- data/rbi/openai/models/decision_create_params.rbi +1273 -26
- data/rbi/openai/models/decision_input_json.rbi +75 -0
- data/rbi/openai/models/decision_input_message.rbi +455 -52
- data/rbi/openai/models/decision_input_part.rbi +2 -1
- data/rbi/openai/models/decision_question_input_image.rbi +82 -0
- data/rbi/openai/models/decision_question_input_part.rbi +25 -0
- data/rbi/openai/models/decision_question_input_text.rbi +49 -0
- data/rbi/openai/models/live/decision_trigger.rbi +72 -9
- data/rbi/openai/models/live/decisions_delegation_config.rbi +72 -9
- data/rbi/openai/models/live/decisions_delegation_update_config.rbi +72 -9
- data/rbi/openai/models.rbi +8 -0
- data/rbi/openai/resources/admin/organization/projects/api_keys.rbi +5 -3
- data/rbi/openai/resources/audio/voices.rbi +18 -0
- data/rbi/openai/resources/decisions.rbi +4 -5
- data/sig/openai/models/audio/voice_delete_params.rbs +25 -0
- data/sig/openai/models/audio/voice_deleted.rbs +37 -0
- data/sig/openai/models/decision_create_params.rbs +610 -24
- data/sig/openai/models/decision_input_json.rbs +34 -0
- data/sig/openai/models/decision_input_message.rbs +264 -35
- data/sig/openai/models/decision_input_part.rbs +3 -1
- data/sig/openai/models/decision_question_input_image.rbs +51 -0
- data/sig/openai/models/decision_question_input_part.rbs +14 -0
- data/sig/openai/models/decision_question_input_text.rbs +15 -0
- data/sig/openai/models/live/decision_trigger.rbs +49 -12
- data/sig/openai/models/live/decisions_delegation_config.rbs +49 -12
- data/sig/openai/models/live/decisions_delegation_update_config.rbs +49 -12
- data/sig/openai/models.rbs +9 -1
- data/sig/openai/resources/audio/voices.rbs +5 -0
- metadata +19 -1
|
@@ -42,8 +42,11 @@ module OpenAI
|
|
|
42
42
|
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
43
43
|
# @!attribute instructions
|
|
44
44
|
#
|
|
45
|
-
# @return [String]
|
|
46
|
-
required
|
|
45
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
46
|
+
required(
|
|
47
|
+
:instructions,
|
|
48
|
+
union: -> { OpenAI::Live::DecisionsDelegationConfig::Question::Predicate::Instructions }
|
|
49
|
+
)
|
|
47
50
|
|
|
48
51
|
# @!attribute type
|
|
49
52
|
# The type of the object. Always `predicate`.
|
|
@@ -59,12 +62,33 @@ module OpenAI
|
|
|
59
62
|
# @!method initialize(instructions:, name: nil, type: :predicate)
|
|
60
63
|
# Estimate how likely it is that a statement about the input is true.
|
|
61
64
|
#
|
|
62
|
-
# @param instructions [String]
|
|
65
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
63
66
|
#
|
|
64
67
|
# @param name [String]
|
|
65
68
|
#
|
|
66
69
|
# @param type [Symbol, :predicate]
|
|
67
70
|
# The type of the object. Always `predicate`.
|
|
71
|
+
|
|
72
|
+
# @see OpenAI::Models::Live::DecisionsDelegationConfig::Question::Predicate#instructions
|
|
73
|
+
module Instructions
|
|
74
|
+
extend OpenAI::Internal::Type::Union
|
|
75
|
+
|
|
76
|
+
variant String
|
|
77
|
+
|
|
78
|
+
variant(
|
|
79
|
+
-> {
|
|
80
|
+
OpenAI::Models::Live::DecisionsDelegationConfig::Question::Predicate::Instructions::DecisionQuestionInputPartArray
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# @!method self.variants
|
|
85
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
86
|
+
|
|
87
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
88
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
89
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
90
|
+
]
|
|
91
|
+
end
|
|
68
92
|
end
|
|
69
93
|
|
|
70
94
|
class Choice < OpenAI::Internal::Type::BaseModel
|
|
@@ -79,8 +103,11 @@ module OpenAI
|
|
|
79
103
|
|
|
80
104
|
# @!attribute instructions
|
|
81
105
|
#
|
|
82
|
-
# @return [String]
|
|
83
|
-
required
|
|
106
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
107
|
+
required(
|
|
108
|
+
:instructions,
|
|
109
|
+
union: -> { OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Instructions }
|
|
110
|
+
)
|
|
84
111
|
|
|
85
112
|
# @!attribute type
|
|
86
113
|
# The type of the object. Always `choice`.
|
|
@@ -99,7 +126,7 @@ module OpenAI
|
|
|
99
126
|
# @param choices [Array<OpenAI::Models::Live::DecisionsDelegationConfig::Question::Choice::Choice>]
|
|
100
127
|
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
101
128
|
#
|
|
102
|
-
# @param instructions [String]
|
|
129
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
103
130
|
#
|
|
104
131
|
# @param name [String]
|
|
105
132
|
#
|
|
@@ -137,13 +164,37 @@ module OpenAI
|
|
|
137
164
|
# @return [Array(String, Boolean)]
|
|
138
165
|
end
|
|
139
166
|
end
|
|
167
|
+
|
|
168
|
+
# @see OpenAI::Models::Live::DecisionsDelegationConfig::Question::Choice#instructions
|
|
169
|
+
module Instructions
|
|
170
|
+
extend OpenAI::Internal::Type::Union
|
|
171
|
+
|
|
172
|
+
variant String
|
|
173
|
+
|
|
174
|
+
variant(
|
|
175
|
+
-> {
|
|
176
|
+
OpenAI::Models::Live::DecisionsDelegationConfig::Question::Choice::Instructions::DecisionQuestionInputPartArray
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
# @!method self.variants
|
|
181
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
182
|
+
|
|
183
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
184
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
185
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
186
|
+
]
|
|
187
|
+
end
|
|
140
188
|
end
|
|
141
189
|
|
|
142
190
|
class Score < OpenAI::Internal::Type::BaseModel
|
|
143
191
|
# @!attribute instructions
|
|
144
192
|
#
|
|
145
|
-
# @return [String]
|
|
146
|
-
required
|
|
193
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
194
|
+
required(
|
|
195
|
+
:instructions,
|
|
196
|
+
union: -> { OpenAI::Live::DecisionsDelegationConfig::Question::Score::Instructions }
|
|
197
|
+
)
|
|
147
198
|
|
|
148
199
|
# @!attribute levels
|
|
149
200
|
#
|
|
@@ -167,7 +218,7 @@ module OpenAI
|
|
|
167
218
|
# @!method initialize(instructions:, levels:, name: nil, type: :score)
|
|
168
219
|
# Rate the input against the supplied ordered levels.
|
|
169
220
|
#
|
|
170
|
-
# @param instructions [String]
|
|
221
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
171
222
|
#
|
|
172
223
|
# @param levels [Array<OpenAI::Models::Live::DecisionsDelegationConfig::Question::Score::Level>]
|
|
173
224
|
#
|
|
@@ -175,6 +226,28 @@ module OpenAI
|
|
|
175
226
|
#
|
|
176
227
|
# @param type [Symbol, :score]
|
|
177
228
|
# The type of the object. Always `score`.
|
|
229
|
+
|
|
230
|
+
# @see OpenAI::Models::Live::DecisionsDelegationConfig::Question::Score#instructions
|
|
231
|
+
module Instructions
|
|
232
|
+
extend OpenAI::Internal::Type::Union
|
|
233
|
+
|
|
234
|
+
variant String
|
|
235
|
+
|
|
236
|
+
variant(
|
|
237
|
+
-> {
|
|
238
|
+
OpenAI::Models::Live::DecisionsDelegationConfig::Question::Score::Instructions::DecisionQuestionInputPartArray
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
# @!method self.variants
|
|
243
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
244
|
+
|
|
245
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
246
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
247
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
248
|
+
]
|
|
249
|
+
end
|
|
250
|
+
|
|
178
251
|
class Level < OpenAI::Internal::Type::BaseModel
|
|
179
252
|
# @!attribute label
|
|
180
253
|
#
|
|
@@ -42,8 +42,11 @@ module OpenAI
|
|
|
42
42
|
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
43
43
|
# @!attribute instructions
|
|
44
44
|
#
|
|
45
|
-
# @return [String]
|
|
46
|
-
required
|
|
45
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
46
|
+
required(
|
|
47
|
+
:instructions,
|
|
48
|
+
union: -> { OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Predicate::Instructions }
|
|
49
|
+
)
|
|
47
50
|
|
|
48
51
|
# @!attribute type
|
|
49
52
|
# The type of the object. Always `predicate`.
|
|
@@ -59,12 +62,33 @@ module OpenAI
|
|
|
59
62
|
# @!method initialize(instructions:, name: nil, type: :predicate)
|
|
60
63
|
# Estimate how likely it is that a statement about the input is true.
|
|
61
64
|
#
|
|
62
|
-
# @param instructions [String]
|
|
65
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
63
66
|
#
|
|
64
67
|
# @param name [String]
|
|
65
68
|
#
|
|
66
69
|
# @param type [Symbol, :predicate]
|
|
67
70
|
# The type of the object. Always `predicate`.
|
|
71
|
+
|
|
72
|
+
# @see OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Predicate#instructions
|
|
73
|
+
module Instructions
|
|
74
|
+
extend OpenAI::Internal::Type::Union
|
|
75
|
+
|
|
76
|
+
variant String
|
|
77
|
+
|
|
78
|
+
variant(
|
|
79
|
+
-> {
|
|
80
|
+
OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Predicate::Instructions::DecisionQuestionInputPartArray
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# @!method self.variants
|
|
85
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
86
|
+
|
|
87
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
88
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
89
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
90
|
+
]
|
|
91
|
+
end
|
|
68
92
|
end
|
|
69
93
|
|
|
70
94
|
class Choice < OpenAI::Internal::Type::BaseModel
|
|
@@ -81,8 +105,11 @@ module OpenAI
|
|
|
81
105
|
|
|
82
106
|
# @!attribute instructions
|
|
83
107
|
#
|
|
84
|
-
# @return [String]
|
|
85
|
-
required
|
|
108
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
109
|
+
required(
|
|
110
|
+
:instructions,
|
|
111
|
+
union: -> { OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::Instructions }
|
|
112
|
+
)
|
|
86
113
|
|
|
87
114
|
# @!attribute type
|
|
88
115
|
# The type of the object. Always `choice`.
|
|
@@ -101,7 +128,7 @@ module OpenAI
|
|
|
101
128
|
# @param choices [Array<OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice>]
|
|
102
129
|
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
103
130
|
#
|
|
104
|
-
# @param instructions [String]
|
|
131
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
105
132
|
#
|
|
106
133
|
# @param name [String]
|
|
107
134
|
#
|
|
@@ -142,13 +169,37 @@ module OpenAI
|
|
|
142
169
|
# @return [Array(String, Boolean)]
|
|
143
170
|
end
|
|
144
171
|
end
|
|
172
|
+
|
|
173
|
+
# @see OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Choice#instructions
|
|
174
|
+
module Instructions
|
|
175
|
+
extend OpenAI::Internal::Type::Union
|
|
176
|
+
|
|
177
|
+
variant String
|
|
178
|
+
|
|
179
|
+
variant(
|
|
180
|
+
-> {
|
|
181
|
+
OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Choice::Instructions::DecisionQuestionInputPartArray
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
# @!method self.variants
|
|
186
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
187
|
+
|
|
188
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
189
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
190
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
191
|
+
]
|
|
192
|
+
end
|
|
145
193
|
end
|
|
146
194
|
|
|
147
195
|
class Score < OpenAI::Internal::Type::BaseModel
|
|
148
196
|
# @!attribute instructions
|
|
149
197
|
#
|
|
150
|
-
# @return [String]
|
|
151
|
-
required
|
|
198
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
199
|
+
required(
|
|
200
|
+
:instructions,
|
|
201
|
+
union: -> { OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score::Instructions }
|
|
202
|
+
)
|
|
152
203
|
|
|
153
204
|
# @!attribute levels
|
|
154
205
|
#
|
|
@@ -174,7 +225,7 @@ module OpenAI
|
|
|
174
225
|
# @!method initialize(instructions:, levels:, name: nil, type: :score)
|
|
175
226
|
# Rate the input against the supplied ordered levels.
|
|
176
227
|
#
|
|
177
|
-
# @param instructions [String]
|
|
228
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
178
229
|
#
|
|
179
230
|
# @param levels [Array<OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Score::Level>]
|
|
180
231
|
#
|
|
@@ -182,6 +233,28 @@ module OpenAI
|
|
|
182
233
|
#
|
|
183
234
|
# @param type [Symbol, :score]
|
|
184
235
|
# The type of the object. Always `score`.
|
|
236
|
+
|
|
237
|
+
# @see OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Score#instructions
|
|
238
|
+
module Instructions
|
|
239
|
+
extend OpenAI::Internal::Type::Union
|
|
240
|
+
|
|
241
|
+
variant String
|
|
242
|
+
|
|
243
|
+
variant(
|
|
244
|
+
-> {
|
|
245
|
+
OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Score::Instructions::DecisionQuestionInputPartArray
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
# @!method self.variants
|
|
250
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
251
|
+
|
|
252
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
253
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
254
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
255
|
+
]
|
|
256
|
+
end
|
|
257
|
+
|
|
185
258
|
class Level < OpenAI::Internal::Type::BaseModel
|
|
186
259
|
# @!attribute label
|
|
187
260
|
#
|
data/lib/openai/models.rb
CHANGED
|
@@ -119,6 +119,8 @@ module OpenAI
|
|
|
119
119
|
|
|
120
120
|
DecisionInputImage = OpenAI::Models::DecisionInputImage
|
|
121
121
|
|
|
122
|
+
DecisionInputJSON = OpenAI::Models::DecisionInputJSON
|
|
123
|
+
|
|
122
124
|
DecisionInputMessage = OpenAI::Models::DecisionInputMessage
|
|
123
125
|
|
|
124
126
|
DecisionInputPart = OpenAI::Models::DecisionInputPart
|
|
@@ -127,6 +129,12 @@ module OpenAI
|
|
|
127
129
|
|
|
128
130
|
DecisionPromptCacheBreakpoint = OpenAI::Models::DecisionPromptCacheBreakpoint
|
|
129
131
|
|
|
132
|
+
DecisionQuestionInputImage = OpenAI::Models::DecisionQuestionInputImage
|
|
133
|
+
|
|
134
|
+
DecisionQuestionInputPart = OpenAI::Models::DecisionQuestionInputPart
|
|
135
|
+
|
|
136
|
+
DecisionQuestionInputText = OpenAI::Models::DecisionQuestionInputText
|
|
137
|
+
|
|
130
138
|
DeletedSkill = OpenAI::Models::DeletedSkill
|
|
131
139
|
|
|
132
140
|
Embedding = OpenAI::Models::Embedding
|
|
@@ -140,10 +140,12 @@ module OpenAI
|
|
|
140
140
|
)
|
|
141
141
|
end
|
|
142
142
|
|
|
143
|
-
# Deletes an API key from the project.
|
|
143
|
+
# Deletes an API key from the project, including keys owned by service accounts.
|
|
144
144
|
#
|
|
145
|
-
#
|
|
146
|
-
# service account.
|
|
145
|
+
# Requires permission to write project API keys. Deleting a service-account key
|
|
146
|
+
# does not delete the service account or its other keys.
|
|
147
|
+
#
|
|
148
|
+
# Returns confirmation of the key deletion.
|
|
147
149
|
#
|
|
148
150
|
# @overload delete(api_key_id, project_id:, request_options: {})
|
|
149
151
|
#
|
|
@@ -41,6 +41,35 @@ module OpenAI
|
|
|
41
41
|
)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
# Deletes a voice created from a text prompt or an audio sample.
|
|
45
|
+
#
|
|
46
|
+
# Requires voice write permission and access to the voice's project. Access to
|
|
47
|
+
# voices created from recordings is limited to eligible customers. See the
|
|
48
|
+
# [custom voices guide](https://developers.openai.com/api/docs/guides/custom-voices).
|
|
49
|
+
#
|
|
50
|
+
# Deleting a voice does not delete its consent recording. Deleting an already
|
|
51
|
+
# deleted voice returns a 404 error.
|
|
52
|
+
#
|
|
53
|
+
# @overload delete(voice_id, request_options: {})
|
|
54
|
+
#
|
|
55
|
+
# @param voice_id [String]
|
|
56
|
+
# The ID of the voice to delete.
|
|
57
|
+
#
|
|
58
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
59
|
+
#
|
|
60
|
+
# @return [OpenAI::Models::Audio::VoiceDeleted]
|
|
61
|
+
#
|
|
62
|
+
# @see OpenAI::Models::Audio::VoiceDeleteParams
|
|
63
|
+
def delete(voice_id, params = {})
|
|
64
|
+
@client.request(
|
|
65
|
+
method: :delete,
|
|
66
|
+
path: ["audio/voices/%1$s", voice_id],
|
|
67
|
+
model: OpenAI::Audio::VoiceDeleted,
|
|
68
|
+
security: {bearer_auth: true},
|
|
69
|
+
options: params[:request_options]
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
44
73
|
# @api private
|
|
45
74
|
#
|
|
46
75
|
# @param client [OpenAI::Client]
|
|
@@ -8,17 +8,16 @@ module OpenAI
|
|
|
8
8
|
#
|
|
9
9
|
# @overload create(input:, model:, questions:, prompt_cache_key: nil, prompt_cache_options: nil, safety_identifier: nil, request_options: {})
|
|
10
10
|
#
|
|
11
|
-
# @param input [String, Array<OpenAI::Models::
|
|
12
|
-
# The
|
|
13
|
-
# messages
|
|
14
|
-
#
|
|
15
|
-
# one request. Files, audio, tools, and item references are not supported.
|
|
11
|
+
# @param input [String, Array<OpenAI::Models::decision_input_message, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput>]
|
|
12
|
+
# The input to evaluate for every question. Provide a text string or an ordered
|
|
13
|
+
# array of messages, function calls and outputs, or custom tool calls and outputs.
|
|
14
|
+
# Each tool output must identify a matching call by call ID.
|
|
16
15
|
#
|
|
17
16
|
# @param model [String]
|
|
18
17
|
# The model to use. Only `gpt-6-luna` is supported.
|
|
19
18
|
#
|
|
20
19
|
# @param questions [Array<OpenAI::Models::DecisionCreateParams::Question::Predicate, OpenAI::Models::DecisionCreateParams::Question::Choice, OpenAI::Models::DecisionCreateParams::Question::Score>]
|
|
21
|
-
# Ask 1–
|
|
20
|
+
# Ask 1–400 questions about the input. Each question can be a predicate, choice,
|
|
22
21
|
# or score. Answers come back in the same order.
|
|
23
22
|
#
|
|
24
23
|
# @param prompt_cache_key [String, nil]
|
data/lib/openai/version.rb
CHANGED
data/lib/openai.rb
CHANGED
|
@@ -471,6 +471,8 @@ require_relative "openai/models/audio/voice_consent_list_params"
|
|
|
471
471
|
require_relative "openai/models/audio/voice_consent_retrieve_params"
|
|
472
472
|
require_relative "openai/models/audio/voice_consent_update_params"
|
|
473
473
|
require_relative "openai/models/audio/voice_create_params"
|
|
474
|
+
require_relative "openai/models/audio/voice_deleted"
|
|
475
|
+
require_relative "openai/models/audio/voice_delete_params"
|
|
474
476
|
require_relative "openai/models/audio_model"
|
|
475
477
|
require_relative "openai/models/audio_response_format"
|
|
476
478
|
require_relative "openai/models/auto_file_chunking_strategy_param"
|
|
@@ -978,10 +980,14 @@ require_relative "openai/models/custom_tool_input_format"
|
|
|
978
980
|
require_relative "openai/models/decision"
|
|
979
981
|
require_relative "openai/models/decision_create_params"
|
|
980
982
|
require_relative "openai/models/decision_input_image"
|
|
983
|
+
require_relative "openai/models/decision_input_json"
|
|
981
984
|
require_relative "openai/models/decision_input_message"
|
|
982
985
|
require_relative "openai/models/decision_input_part"
|
|
983
986
|
require_relative "openai/models/decision_input_text"
|
|
984
987
|
require_relative "openai/models/decision_prompt_cache_breakpoint"
|
|
988
|
+
require_relative "openai/models/decision_question_input_image"
|
|
989
|
+
require_relative "openai/models/decision_question_input_part"
|
|
990
|
+
require_relative "openai/models/decision_question_input_text"
|
|
985
991
|
require_relative "openai/models/deleted_skill"
|
|
986
992
|
require_relative "openai/models/embedding"
|
|
987
993
|
require_relative "openai/models/embedding_create_params"
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Audio
|
|
7
|
+
|
|
8
|
+
class VoiceDeleteParams < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
OrHash = T.type_alias do
|
|
14
|
+
T.any(
|
|
15
|
+
OpenAI::Audio::VoiceDeleteParams,
|
|
16
|
+
OpenAI::Internal::AnyHash
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :voice_id
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
|
|
26
|
+
voice_id: String,
|
|
27
|
+
|
|
28
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
29
|
+
)
|
|
30
|
+
.returns(T.attached_class)
|
|
31
|
+
end
|
|
32
|
+
def self.new(
|
|
33
|
+
|
|
34
|
+
voice_id:,
|
|
35
|
+
|
|
36
|
+
request_options: {}
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
override.returns(
|
|
42
|
+
{voice_id: String, request_options: OpenAI::RequestOptions}
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
def to_hash
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Audio
|
|
7
|
+
|
|
8
|
+
class VoiceDeleted < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Audio::VoiceDeleted,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The voice identifier.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Whether the voice was deleted.
|
|
22
|
+
sig { returns(T::Boolean) }
|
|
23
|
+
attr_accessor :deleted
|
|
24
|
+
|
|
25
|
+
# The object type, which is always `audio.voice.deleted`.
|
|
26
|
+
sig { returns(Symbol) }
|
|
27
|
+
attr_accessor :object
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
|
|
32
|
+
id: String,
|
|
33
|
+
|
|
34
|
+
deleted: T::Boolean,
|
|
35
|
+
|
|
36
|
+
object: Symbol
|
|
37
|
+
)
|
|
38
|
+
.returns(T.attached_class)
|
|
39
|
+
end
|
|
40
|
+
def self.new(
|
|
41
|
+
|
|
42
|
+
# The voice identifier.
|
|
43
|
+
id:,
|
|
44
|
+
|
|
45
|
+
# Whether the voice was deleted.
|
|
46
|
+
deleted:,
|
|
47
|
+
|
|
48
|
+
# The object type, which is always `audio.voice.deleted`.
|
|
49
|
+
|
|
50
|
+
object: :"audio.voice.deleted"
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
override.returns(
|
|
56
|
+
{id: String, deleted: T::Boolean, object: Symbol}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
def to_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
67
|
+
end
|