openai 0.100.0 → 0.101.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 +7 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +4 -0
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +1166 -3
- data/lib/openai/models/beta/beta_tool_search_output_namespace_tool.rb +176 -0
- data/lib/openai/models/decision.rb +313 -0
- data/lib/openai/models/decision_create_params.rb +233 -0
- data/lib/openai/models/decision_input_image.rb +53 -0
- data/lib/openai/models/decision_input_message.rb +60 -0
- data/lib/openai/models/decision_input_part.rb +20 -0
- data/lib/openai/models/decision_input_text.rb +21 -0
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +1166 -3
- data/lib/openai/models/responses/tool_search_output_namespace_tool.rb +174 -0
- data/lib/openai/models.rb +12 -0
- data/lib/openai/resources/decisions.rb +59 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +9 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +1893 -18
- data/rbi/openai/models/beta/beta_tool_search_output_namespace_tool.rbi +272 -0
- data/rbi/openai/models/decision.rbi +586 -0
- data/rbi/openai/models/decision_create_params.rbi +435 -0
- data/rbi/openai/models/decision_input_image.rbi +81 -0
- data/rbi/openai/models/decision_input_message.rbi +96 -0
- data/rbi/openai/models/decision_input_part.rbi +24 -0
- data/rbi/openai/models/decision_input_text.rbi +49 -0
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +1901 -18
- data/rbi/openai/models/responses/tool_search_output_namespace_tool.rbi +272 -0
- data/rbi/openai/models.rbi +12 -0
- data/rbi/openai/resources/decisions.rbi +57 -0
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +993 -4
- data/sig/openai/models/beta/beta_tool_search_output_namespace_tool.rbs +162 -0
- data/sig/openai/models/decision.rbs +296 -0
- data/sig/openai/models/decision_create_params.rbs +227 -0
- data/sig/openai/models/decision_input_image.rbs +51 -0
- data/sig/openai/models/decision_input_message.rbs +57 -0
- data/sig/openai/models/decision_input_part.rbs +12 -0
- data/sig/openai/models/decision_input_text.rbs +15 -0
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +993 -4
- data/sig/openai/models/responses/tool_search_output_namespace_tool.rbs +160 -0
- data/sig/openai/models.rbs +12 -0
- data/sig/openai/resources/decisions.rbs +15 -0
- metadata +28 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolSearchOutputNamespaceTool = Beta::BetaToolSearchOutputNamespaceTool
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_search_output_namespace_tool =
|
|
7
|
+
{
|
|
8
|
+
description: String,
|
|
9
|
+
name: String,
|
|
10
|
+
tools: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool],
|
|
11
|
+
?type: :namespace
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class BetaToolSearchOutputNamespaceTool < OpenAI::Internal::Type::BaseModel
|
|
15
|
+
# A description of the namespace shown to the model.
|
|
16
|
+
attr_accessor description: String
|
|
17
|
+
|
|
18
|
+
# The namespace name used in tool calls (for example, `crm`).
|
|
19
|
+
attr_accessor name: String
|
|
20
|
+
|
|
21
|
+
# The function/custom tools loaded inside this namespace.
|
|
22
|
+
attr_accessor tools: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool]
|
|
23
|
+
|
|
24
|
+
# The type of the tool. Always `namespace`.
|
|
25
|
+
attr_accessor type: :namespace
|
|
26
|
+
|
|
27
|
+
# @param description
|
|
28
|
+
# A description of the namespace shown to the model.
|
|
29
|
+
# @param name
|
|
30
|
+
# The namespace name used in tool calls (for example, `crm`).
|
|
31
|
+
# @param tools
|
|
32
|
+
# The function/custom tools loaded inside this namespace.
|
|
33
|
+
# @param type
|
|
34
|
+
# The type of the tool. Always `namespace`.
|
|
35
|
+
def initialize: (
|
|
36
|
+
description: String,
|
|
37
|
+
name: String,
|
|
38
|
+
tools: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool],
|
|
39
|
+
?type: :namespace
|
|
40
|
+
) -> void
|
|
41
|
+
|
|
42
|
+
def to_hash: -> {
|
|
43
|
+
description: String,
|
|
44
|
+
name: String,
|
|
45
|
+
tools: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool],
|
|
46
|
+
?type: :namespace
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type tool =
|
|
50
|
+
OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function
|
|
51
|
+
| OpenAI::Beta::BetaCustomTool
|
|
52
|
+
|
|
53
|
+
module Tool
|
|
54
|
+
extend OpenAI::Internal::Type::Union
|
|
55
|
+
|
|
56
|
+
type function =
|
|
57
|
+
{
|
|
58
|
+
name: String,
|
|
59
|
+
?type: :function,
|
|
60
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]?,
|
|
61
|
+
?async: bool,
|
|
62
|
+
?defer_loading: bool,
|
|
63
|
+
?description: String?,
|
|
64
|
+
?output_schema: ::Hash[Symbol, top]?,
|
|
65
|
+
?parameters: top?,
|
|
66
|
+
?strict: bool?
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
class Function < OpenAI::Internal::Type::BaseModel
|
|
70
|
+
# The name of the loaded function tool.
|
|
71
|
+
attr_accessor name: String
|
|
72
|
+
|
|
73
|
+
attr_accessor type: :function
|
|
74
|
+
|
|
75
|
+
# The tool invocation context(s).
|
|
76
|
+
attr_accessor allowed_callers: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]?
|
|
77
|
+
|
|
78
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
79
|
+
# returned on next response creation.
|
|
80
|
+
attr_reader async: bool?
|
|
81
|
+
|
|
82
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
83
|
+
# returned on next response creation.
|
|
84
|
+
def async=: (bool) -> bool
|
|
85
|
+
|
|
86
|
+
# Whether this function should be deferred and discovered via tool search.
|
|
87
|
+
attr_reader defer_loading: bool?
|
|
88
|
+
|
|
89
|
+
# Whether this function should be deferred and discovered via tool search.
|
|
90
|
+
def defer_loading=: (bool) -> bool
|
|
91
|
+
|
|
92
|
+
attr_accessor description: String?
|
|
93
|
+
|
|
94
|
+
# A JSON Schema describing the JSON value encoded in string outputs for this
|
|
95
|
+
# function tool. This does not describe content-array outputs.
|
|
96
|
+
attr_accessor output_schema: ::Hash[Symbol, top]?
|
|
97
|
+
|
|
98
|
+
attr_accessor parameters: top?
|
|
99
|
+
|
|
100
|
+
# Whether to enforce strict parameter validation. If omitted, Responses attempts
|
|
101
|
+
# to use strict validation when the schema is compatible, and falls back to
|
|
102
|
+
# non-strict validation otherwise.
|
|
103
|
+
attr_accessor strict: bool?
|
|
104
|
+
|
|
105
|
+
# @param name
|
|
106
|
+
# The name of the loaded function tool.
|
|
107
|
+
# @param allowed_callers
|
|
108
|
+
# The tool invocation context(s).
|
|
109
|
+
# @param async
|
|
110
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
111
|
+
# returned on next response creation.
|
|
112
|
+
# @param defer_loading
|
|
113
|
+
# Whether this function should be deferred and discovered via tool search.
|
|
114
|
+
# @param output_schema
|
|
115
|
+
# A JSON Schema describing the JSON value encoded in string outputs for this
|
|
116
|
+
# function tool. This does not describe content-array outputs.
|
|
117
|
+
# @param strict
|
|
118
|
+
# Whether to enforce strict parameter validation. If omitted, Responses attempts
|
|
119
|
+
# to use strict validation when the schema is compatible, and falls back to
|
|
120
|
+
# non-strict validation otherwise.
|
|
121
|
+
def initialize: (
|
|
122
|
+
name: String,
|
|
123
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]?,
|
|
124
|
+
?async: bool,
|
|
125
|
+
?defer_loading: bool,
|
|
126
|
+
?description: String?,
|
|
127
|
+
?output_schema: ::Hash[Symbol, top]?,
|
|
128
|
+
?parameters: top?,
|
|
129
|
+
?strict: bool?,
|
|
130
|
+
?type: :function
|
|
131
|
+
) -> void
|
|
132
|
+
|
|
133
|
+
def to_hash: -> {
|
|
134
|
+
name: String,
|
|
135
|
+
?type: :function,
|
|
136
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]?,
|
|
137
|
+
?async: bool,
|
|
138
|
+
?defer_loading: bool,
|
|
139
|
+
?description: String?,
|
|
140
|
+
?output_schema: ::Hash[Symbol, top]?,
|
|
141
|
+
?parameters: top?,
|
|
142
|
+
?strict: bool?
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
type allowed_caller = :direct | :programmatic
|
|
146
|
+
|
|
147
|
+
module AllowedCaller
|
|
148
|
+
extend OpenAI::Internal::Type::Enum
|
|
149
|
+
|
|
150
|
+
DIRECT: :direct
|
|
151
|
+
PROGRAMMATIC: :programmatic
|
|
152
|
+
|
|
153
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool]
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
type decision =
|
|
4
|
+
{
|
|
5
|
+
answers: ::Array[OpenAI::Models::Decision::answer],
|
|
6
|
+
model: String,
|
|
7
|
+
usage: OpenAI::Decision::Usage
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class Decision < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor answers: ::Array[OpenAI::Models::Decision::answer]
|
|
12
|
+
|
|
13
|
+
attr_accessor model: String
|
|
14
|
+
|
|
15
|
+
attr_accessor usage: OpenAI::Decision::Usage
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
answers: ::Array[OpenAI::Models::Decision::answer],
|
|
19
|
+
model: String,
|
|
20
|
+
usage: OpenAI::Decision::Usage
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
answers: ::Array[OpenAI::Models::Decision::answer],
|
|
25
|
+
model: String,
|
|
26
|
+
usage: OpenAI::Decision::Usage
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type answer =
|
|
30
|
+
OpenAI::Decision::Answer::Predicate
|
|
31
|
+
| OpenAI::Decision::Answer::Choice
|
|
32
|
+
| OpenAI::Decision::Answer::Score
|
|
33
|
+
| OpenAI::Decision::Answer::Refusal
|
|
34
|
+
|
|
35
|
+
module Answer
|
|
36
|
+
extend OpenAI::Internal::Type::Union
|
|
37
|
+
|
|
38
|
+
type predicate =
|
|
39
|
+
{ name: String?, probability: Float, ?type: :predicate }
|
|
40
|
+
|
|
41
|
+
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
42
|
+
attr_accessor name: String?
|
|
43
|
+
|
|
44
|
+
attr_accessor probability: Float
|
|
45
|
+
|
|
46
|
+
# The type of the object. Always `predicate`.
|
|
47
|
+
attr_accessor type: :predicate
|
|
48
|
+
|
|
49
|
+
# @param type
|
|
50
|
+
# The type of the object. Always `predicate`.
|
|
51
|
+
def initialize: (
|
|
52
|
+
name: String?,
|
|
53
|
+
probability: Float,
|
|
54
|
+
?type: :predicate
|
|
55
|
+
) -> void
|
|
56
|
+
|
|
57
|
+
def to_hash: -> {
|
|
58
|
+
name: String?,
|
|
59
|
+
probability: Float,
|
|
60
|
+
?type: :predicate
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
type choice =
|
|
65
|
+
{
|
|
66
|
+
choice: OpenAI::Models::Decision::Answer::Choice::choice,
|
|
67
|
+
confidence: Float,
|
|
68
|
+
name: String?,
|
|
69
|
+
probabilities: ::Array[OpenAI::Decision::Answer::Choice::Probability],
|
|
70
|
+
?type: :choice
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
74
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
75
|
+
attr_accessor choice: OpenAI::Models::Decision::Answer::Choice::choice
|
|
76
|
+
|
|
77
|
+
attr_accessor confidence: Float
|
|
78
|
+
|
|
79
|
+
attr_accessor name: String?
|
|
80
|
+
|
|
81
|
+
attr_accessor probabilities: ::Array[OpenAI::Decision::Answer::Choice::Probability]
|
|
82
|
+
|
|
83
|
+
# The type of the object. Always `choice`.
|
|
84
|
+
attr_accessor type: :choice
|
|
85
|
+
|
|
86
|
+
# @param choice
|
|
87
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
88
|
+
# @param type
|
|
89
|
+
# The type of the object. Always `choice`.
|
|
90
|
+
def initialize: (
|
|
91
|
+
choice: OpenAI::Models::Decision::Answer::Choice::choice,
|
|
92
|
+
confidence: Float,
|
|
93
|
+
name: String?,
|
|
94
|
+
probabilities: ::Array[OpenAI::Decision::Answer::Choice::Probability],
|
|
95
|
+
?type: :choice
|
|
96
|
+
) -> void
|
|
97
|
+
|
|
98
|
+
def to_hash: -> {
|
|
99
|
+
choice: OpenAI::Models::Decision::Answer::Choice::choice,
|
|
100
|
+
confidence: Float,
|
|
101
|
+
name: String?,
|
|
102
|
+
probabilities: ::Array[OpenAI::Decision::Answer::Choice::Probability],
|
|
103
|
+
?type: :choice
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
type choice = String | bool
|
|
107
|
+
|
|
108
|
+
module Choice
|
|
109
|
+
extend OpenAI::Internal::Type::Union
|
|
110
|
+
|
|
111
|
+
def self?.variants: -> ::Array[OpenAI::Models::Decision::Answer::Choice::choice]
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
type probability =
|
|
115
|
+
{
|
|
116
|
+
probability: Float,
|
|
117
|
+
value: OpenAI::Models::Decision::Answer::Choice::Probability::value
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
class Probability < OpenAI::Internal::Type::BaseModel
|
|
121
|
+
attr_accessor probability: Float
|
|
122
|
+
|
|
123
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
124
|
+
attr_accessor value: OpenAI::Models::Decision::Answer::Choice::Probability::value
|
|
125
|
+
|
|
126
|
+
# @param value
|
|
127
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
128
|
+
def initialize: (
|
|
129
|
+
probability: Float,
|
|
130
|
+
value: OpenAI::Models::Decision::Answer::Choice::Probability::value
|
|
131
|
+
) -> void
|
|
132
|
+
|
|
133
|
+
def to_hash: -> {
|
|
134
|
+
probability: Float,
|
|
135
|
+
value: OpenAI::Models::Decision::Answer::Choice::Probability::value
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
type value = String | bool
|
|
139
|
+
|
|
140
|
+
module Value
|
|
141
|
+
extend OpenAI::Internal::Type::Union
|
|
142
|
+
|
|
143
|
+
def self?.variants: -> ::Array[OpenAI::Models::Decision::Answer::Choice::Probability::value]
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
type score =
|
|
149
|
+
{
|
|
150
|
+
confidence: Float,
|
|
151
|
+
name: String?,
|
|
152
|
+
probabilities: ::Array[OpenAI::Decision::Answer::Score::Probability],
|
|
153
|
+
score: Float,
|
|
154
|
+
?type: :score
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
class Score < OpenAI::Internal::Type::BaseModel
|
|
158
|
+
attr_accessor confidence: Float
|
|
159
|
+
|
|
160
|
+
attr_accessor name: String?
|
|
161
|
+
|
|
162
|
+
attr_accessor probabilities: ::Array[OpenAI::Decision::Answer::Score::Probability]
|
|
163
|
+
|
|
164
|
+
attr_accessor score: Float
|
|
165
|
+
|
|
166
|
+
# The type of the object. Always `score`.
|
|
167
|
+
attr_accessor type: :score
|
|
168
|
+
|
|
169
|
+
# @param type
|
|
170
|
+
# The type of the object. Always `score`.
|
|
171
|
+
def initialize: (
|
|
172
|
+
confidence: Float,
|
|
173
|
+
name: String?,
|
|
174
|
+
probabilities: ::Array[OpenAI::Decision::Answer::Score::Probability],
|
|
175
|
+
score: Float,
|
|
176
|
+
?type: :score
|
|
177
|
+
) -> void
|
|
178
|
+
|
|
179
|
+
def to_hash: -> {
|
|
180
|
+
confidence: Float,
|
|
181
|
+
name: String?,
|
|
182
|
+
probabilities: ::Array[OpenAI::Decision::Answer::Score::Probability],
|
|
183
|
+
score: Float,
|
|
184
|
+
?type: :score
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
type probability =
|
|
188
|
+
{ label: String, probability: Float, value: Integer }
|
|
189
|
+
|
|
190
|
+
class Probability < OpenAI::Internal::Type::BaseModel
|
|
191
|
+
attr_accessor label: String
|
|
192
|
+
|
|
193
|
+
attr_accessor probability: Float
|
|
194
|
+
|
|
195
|
+
attr_accessor value: Integer
|
|
196
|
+
|
|
197
|
+
def initialize: (
|
|
198
|
+
label: String,
|
|
199
|
+
probability: Float,
|
|
200
|
+
value: Integer
|
|
201
|
+
) -> void
|
|
202
|
+
|
|
203
|
+
def to_hash: -> {
|
|
204
|
+
label: String,
|
|
205
|
+
probability: Float,
|
|
206
|
+
value: Integer
|
|
207
|
+
}
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
type refusal = { name: String?, ?type: :refusal }
|
|
212
|
+
|
|
213
|
+
class Refusal < OpenAI::Internal::Type::BaseModel
|
|
214
|
+
attr_accessor name: String?
|
|
215
|
+
|
|
216
|
+
# The type of the object. Always `refusal`.
|
|
217
|
+
attr_accessor type: :refusal
|
|
218
|
+
|
|
219
|
+
# @param type
|
|
220
|
+
# The type of the object. Always `refusal`.
|
|
221
|
+
def initialize: (name: String?, ?type: :refusal) -> void
|
|
222
|
+
|
|
223
|
+
def to_hash: -> { name: String?, ?type: :refusal }
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
def self?.variants: -> ::Array[OpenAI::Models::Decision::answer]
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
type usage =
|
|
230
|
+
{
|
|
231
|
+
input_tokens: Integer,
|
|
232
|
+
input_tokens_details: OpenAI::Decision::Usage::InputTokensDetails,
|
|
233
|
+
output_tokens: Integer,
|
|
234
|
+
output_tokens_details: OpenAI::Decision::Usage::OutputTokensDetails,
|
|
235
|
+
total_tokens: Integer
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
class Usage < OpenAI::Internal::Type::BaseModel
|
|
239
|
+
attr_accessor input_tokens: Integer
|
|
240
|
+
|
|
241
|
+
attr_accessor input_tokens_details: OpenAI::Decision::Usage::InputTokensDetails
|
|
242
|
+
|
|
243
|
+
attr_accessor output_tokens: Integer
|
|
244
|
+
|
|
245
|
+
attr_accessor output_tokens_details: OpenAI::Decision::Usage::OutputTokensDetails
|
|
246
|
+
|
|
247
|
+
attr_accessor total_tokens: Integer
|
|
248
|
+
|
|
249
|
+
def initialize: (
|
|
250
|
+
input_tokens: Integer,
|
|
251
|
+
input_tokens_details: OpenAI::Decision::Usage::InputTokensDetails,
|
|
252
|
+
output_tokens: Integer,
|
|
253
|
+
output_tokens_details: OpenAI::Decision::Usage::OutputTokensDetails,
|
|
254
|
+
total_tokens: Integer
|
|
255
|
+
) -> void
|
|
256
|
+
|
|
257
|
+
def to_hash: -> {
|
|
258
|
+
input_tokens: Integer,
|
|
259
|
+
input_tokens_details: OpenAI::Decision::Usage::InputTokensDetails,
|
|
260
|
+
output_tokens: Integer,
|
|
261
|
+
output_tokens_details: OpenAI::Decision::Usage::OutputTokensDetails,
|
|
262
|
+
total_tokens: Integer
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
type input_tokens_details =
|
|
266
|
+
{ cache_write_tokens: Integer, cached_tokens: Integer }
|
|
267
|
+
|
|
268
|
+
class InputTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
269
|
+
attr_accessor cache_write_tokens: Integer
|
|
270
|
+
|
|
271
|
+
attr_accessor cached_tokens: Integer
|
|
272
|
+
|
|
273
|
+
def initialize: (
|
|
274
|
+
cache_write_tokens: Integer,
|
|
275
|
+
cached_tokens: Integer
|
|
276
|
+
) -> void
|
|
277
|
+
|
|
278
|
+
def to_hash: -> {
|
|
279
|
+
cache_write_tokens: Integer,
|
|
280
|
+
cached_tokens: Integer
|
|
281
|
+
}
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
type output_tokens_details = { reasoning_tokens: Integer }
|
|
285
|
+
|
|
286
|
+
class OutputTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
287
|
+
attr_accessor reasoning_tokens: Integer
|
|
288
|
+
|
|
289
|
+
def initialize: (reasoning_tokens: Integer) -> void
|
|
290
|
+
|
|
291
|
+
def to_hash: -> { reasoning_tokens: Integer }
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
end
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
type decision_create_params =
|
|
4
|
+
{
|
|
5
|
+
input: OpenAI::Models::DecisionCreateParams::input,
|
|
6
|
+
model: String,
|
|
7
|
+
questions: ::Array[OpenAI::Models::DecisionCreateParams::question],
|
|
8
|
+
?safety_identifier: String?,
|
|
9
|
+
?request_options: OpenAI::request_opts
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class DecisionCreateParams < OpenAI::Internal::Type::BaseModel
|
|
13
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
14
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
15
|
+
|
|
16
|
+
# Shared evidence, as a string or an array of user messages containing text and
|
|
17
|
+
# inline images. Non-user roles, function calls, function-call outputs, files,
|
|
18
|
+
# audio, and item references are not supported. At most 128 image parts are
|
|
19
|
+
# allowed across all messages in one request.
|
|
20
|
+
attr_accessor input: OpenAI::Models::DecisionCreateParams::input
|
|
21
|
+
|
|
22
|
+
attr_accessor model: String
|
|
23
|
+
|
|
24
|
+
attr_accessor questions: ::Array[OpenAI::Models::DecisionCreateParams::question]
|
|
25
|
+
|
|
26
|
+
# Opaque caller-provided end-user identifier, scoped by the verified org. Match
|
|
27
|
+
# Responses' limit; this is never the authenticated user identity.
|
|
28
|
+
attr_accessor safety_identifier: String?
|
|
29
|
+
|
|
30
|
+
# @param input
|
|
31
|
+
# Shared evidence, as a string or an array of user messages containing text and
|
|
32
|
+
# inline images. Non-user roles, function calls, function-call outputs, files,
|
|
33
|
+
# audio, and item references are not supported. At most 128 image parts are
|
|
34
|
+
# allowed across all messages in one request.
|
|
35
|
+
# @param safety_identifier
|
|
36
|
+
# Opaque caller-provided end-user identifier, scoped by the verified org. Match
|
|
37
|
+
# Responses' limit; this is never the authenticated user identity.
|
|
38
|
+
def initialize: (
|
|
39
|
+
input: OpenAI::Models::DecisionCreateParams::input,
|
|
40
|
+
model: String,
|
|
41
|
+
questions: ::Array[OpenAI::Models::DecisionCreateParams::question],
|
|
42
|
+
?safety_identifier: String?,
|
|
43
|
+
?request_options: OpenAI::request_opts
|
|
44
|
+
) -> void
|
|
45
|
+
|
|
46
|
+
def to_hash: -> {
|
|
47
|
+
input: OpenAI::Models::DecisionCreateParams::input,
|
|
48
|
+
model: String,
|
|
49
|
+
questions: ::Array[OpenAI::Models::DecisionCreateParams::question],
|
|
50
|
+
?safety_identifier: String?,
|
|
51
|
+
?request_options: OpenAI::RequestOptions
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type input = String | ::Array[OpenAI::DecisionInputMessage]
|
|
55
|
+
|
|
56
|
+
module Input
|
|
57
|
+
extend OpenAI::Internal::Type::Union
|
|
58
|
+
|
|
59
|
+
def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::input]
|
|
60
|
+
|
|
61
|
+
DecisionInputMessageArray: OpenAI::Internal::Type::Converter
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
type question =
|
|
65
|
+
OpenAI::DecisionCreateParams::Question::Predicate
|
|
66
|
+
| OpenAI::DecisionCreateParams::Question::Choice
|
|
67
|
+
| OpenAI::DecisionCreateParams::Question::Score
|
|
68
|
+
|
|
69
|
+
module Question
|
|
70
|
+
extend OpenAI::Internal::Type::Union
|
|
71
|
+
|
|
72
|
+
type predicate =
|
|
73
|
+
{ instructions: String, ?type: :predicate, ?name: String }
|
|
74
|
+
|
|
75
|
+
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
76
|
+
attr_accessor instructions: String
|
|
77
|
+
|
|
78
|
+
# The type of the object. Always `predicate`.
|
|
79
|
+
attr_accessor type: :predicate
|
|
80
|
+
|
|
81
|
+
attr_reader name: String?
|
|
82
|
+
|
|
83
|
+
def name=: (String) -> String
|
|
84
|
+
|
|
85
|
+
# @param type
|
|
86
|
+
# The type of the object. Always `predicate`.
|
|
87
|
+
def initialize: (
|
|
88
|
+
instructions: String,
|
|
89
|
+
?name: String,
|
|
90
|
+
?type: :predicate
|
|
91
|
+
) -> void
|
|
92
|
+
|
|
93
|
+
def to_hash: -> {
|
|
94
|
+
instructions: String,
|
|
95
|
+
?type: :predicate,
|
|
96
|
+
?name: String
|
|
97
|
+
}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
type choice =
|
|
101
|
+
{
|
|
102
|
+
choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice],
|
|
103
|
+
instructions: String,
|
|
104
|
+
?type: :choice,
|
|
105
|
+
?name: String
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
109
|
+
attr_accessor choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice]
|
|
110
|
+
|
|
111
|
+
attr_accessor instructions: String
|
|
112
|
+
|
|
113
|
+
# The type of the object. Always `choice`.
|
|
114
|
+
attr_accessor type: :choice
|
|
115
|
+
|
|
116
|
+
attr_reader name: String?
|
|
117
|
+
|
|
118
|
+
def name=: (String) -> String
|
|
119
|
+
|
|
120
|
+
# @param type
|
|
121
|
+
# The type of the object. Always `choice`.
|
|
122
|
+
def initialize: (
|
|
123
|
+
choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice],
|
|
124
|
+
instructions: String,
|
|
125
|
+
?name: String,
|
|
126
|
+
?type: :choice
|
|
127
|
+
) -> void
|
|
128
|
+
|
|
129
|
+
def to_hash: -> {
|
|
130
|
+
choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice],
|
|
131
|
+
instructions: String,
|
|
132
|
+
?type: :choice,
|
|
133
|
+
?name: String
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
type choice =
|
|
137
|
+
{
|
|
138
|
+
value: OpenAI::Models::DecisionCreateParams::Question::Choice::Choice::value,
|
|
139
|
+
?description: String
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
143
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
144
|
+
attr_accessor value: OpenAI::Models::DecisionCreateParams::Question::Choice::Choice::value
|
|
145
|
+
|
|
146
|
+
attr_reader description: String?
|
|
147
|
+
|
|
148
|
+
def description=: (String) -> String
|
|
149
|
+
|
|
150
|
+
# @param value
|
|
151
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
152
|
+
def initialize: (
|
|
153
|
+
value: OpenAI::Models::DecisionCreateParams::Question::Choice::Choice::value,
|
|
154
|
+
?description: String
|
|
155
|
+
) -> void
|
|
156
|
+
|
|
157
|
+
def to_hash: -> {
|
|
158
|
+
value: OpenAI::Models::DecisionCreateParams::Question::Choice::Choice::value,
|
|
159
|
+
?description: String
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
type value = String | bool
|
|
163
|
+
|
|
164
|
+
module Value
|
|
165
|
+
extend OpenAI::Internal::Type::Union
|
|
166
|
+
|
|
167
|
+
def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Question::Choice::Choice::value]
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
type score =
|
|
173
|
+
{
|
|
174
|
+
instructions: String,
|
|
175
|
+
levels: ::Array[OpenAI::DecisionCreateParams::Question::Score::Level],
|
|
176
|
+
?type: :score,
|
|
177
|
+
?name: String
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
class Score < OpenAI::Internal::Type::BaseModel
|
|
181
|
+
attr_accessor instructions: String
|
|
182
|
+
|
|
183
|
+
attr_accessor levels: ::Array[OpenAI::DecisionCreateParams::Question::Score::Level]
|
|
184
|
+
|
|
185
|
+
# The type of the object. Always `score`.
|
|
186
|
+
attr_accessor type: :score
|
|
187
|
+
|
|
188
|
+
attr_reader name: String?
|
|
189
|
+
|
|
190
|
+
def name=: (String) -> String
|
|
191
|
+
|
|
192
|
+
# @param type
|
|
193
|
+
# The type of the object. Always `score`.
|
|
194
|
+
def initialize: (
|
|
195
|
+
instructions: String,
|
|
196
|
+
levels: ::Array[OpenAI::DecisionCreateParams::Question::Score::Level],
|
|
197
|
+
?name: String,
|
|
198
|
+
?type: :score
|
|
199
|
+
) -> void
|
|
200
|
+
|
|
201
|
+
def to_hash: -> {
|
|
202
|
+
instructions: String,
|
|
203
|
+
levels: ::Array[OpenAI::DecisionCreateParams::Question::Score::Level],
|
|
204
|
+
?type: :score,
|
|
205
|
+
?name: String
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
type level = { label: String, ?description: String }
|
|
209
|
+
|
|
210
|
+
class Level < OpenAI::Internal::Type::BaseModel
|
|
211
|
+
attr_accessor label: String
|
|
212
|
+
|
|
213
|
+
attr_reader description: String?
|
|
214
|
+
|
|
215
|
+
def description=: (String) -> String
|
|
216
|
+
|
|
217
|
+
def initialize: (label: String, ?description: String) -> void
|
|
218
|
+
|
|
219
|
+
def to_hash: -> { label: String, ?description: String }
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::question]
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
end
|