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,272 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
BetaToolSearchOutputNamespaceTool = Beta::BetaToolSearchOutputNamespaceTool
|
|
7
|
+
|
|
8
|
+
module Beta
|
|
9
|
+
|
|
10
|
+
class BetaToolSearchOutputNamespaceTool < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
|
|
12
|
+
OrHash = T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
OpenAI::Beta::BetaToolSearchOutputNamespaceTool,
|
|
15
|
+
OpenAI::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# A description of the namespace shown to the model.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :description
|
|
22
|
+
|
|
23
|
+
# The namespace name used in tool calls (for example, `crm`).
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# The function/custom tools loaded inside this namespace.
|
|
28
|
+
sig {
|
|
29
|
+
returns(
|
|
30
|
+
T::Array[
|
|
31
|
+
T.any(OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function, OpenAI::Beta::BetaCustomTool)
|
|
32
|
+
]
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
attr_accessor :tools
|
|
36
|
+
|
|
37
|
+
# The type of the tool. Always `namespace`.
|
|
38
|
+
sig { returns(Symbol) }
|
|
39
|
+
attr_accessor :type
|
|
40
|
+
|
|
41
|
+
# Groups function/custom tools under a shared namespace.
|
|
42
|
+
sig do
|
|
43
|
+
params(
|
|
44
|
+
|
|
45
|
+
description: String,
|
|
46
|
+
|
|
47
|
+
name: String,
|
|
48
|
+
|
|
49
|
+
tools: T::Array[
|
|
50
|
+
T.any(
|
|
51
|
+
OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::OrHash,
|
|
52
|
+
OpenAI::Beta::BetaCustomTool::OrHash
|
|
53
|
+
)
|
|
54
|
+
],
|
|
55
|
+
|
|
56
|
+
type: Symbol
|
|
57
|
+
)
|
|
58
|
+
.returns(T.attached_class)
|
|
59
|
+
end
|
|
60
|
+
def self.new(
|
|
61
|
+
|
|
62
|
+
# A description of the namespace shown to the model.
|
|
63
|
+
description:,
|
|
64
|
+
|
|
65
|
+
# The namespace name used in tool calls (for example, `crm`).
|
|
66
|
+
name:,
|
|
67
|
+
|
|
68
|
+
# The function/custom tools loaded inside this namespace.
|
|
69
|
+
tools:,
|
|
70
|
+
|
|
71
|
+
# The type of the tool. Always `namespace`.
|
|
72
|
+
|
|
73
|
+
type: :namespace
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
sig do
|
|
78
|
+
override.returns(
|
|
79
|
+
{
|
|
80
|
+
description: String,
|
|
81
|
+
name: String,
|
|
82
|
+
tools: T::Array[
|
|
83
|
+
T.any(OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function, OpenAI::Beta::BetaCustomTool)
|
|
84
|
+
],
|
|
85
|
+
type: Symbol
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
def to_hash
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# A function or custom tool loaded into a namespace by tool search.
|
|
93
|
+
module Tool
|
|
94
|
+
extend OpenAI::Internal::Type::Union
|
|
95
|
+
|
|
96
|
+
Variants = T.type_alias {
|
|
97
|
+
T.any(OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function, OpenAI::Beta::BetaCustomTool)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
class Function < OpenAI::Internal::Type::BaseModel
|
|
101
|
+
OrHash = T.type_alias do
|
|
102
|
+
T.any(
|
|
103
|
+
OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function,
|
|
104
|
+
OpenAI::Internal::AnyHash
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# The name of the loaded function tool.
|
|
109
|
+
sig { returns(String) }
|
|
110
|
+
attr_accessor :name
|
|
111
|
+
|
|
112
|
+
sig { returns(Symbol) }
|
|
113
|
+
attr_accessor :type
|
|
114
|
+
|
|
115
|
+
# The tool invocation context(s).
|
|
116
|
+
sig {
|
|
117
|
+
returns(
|
|
118
|
+
T.nilable(
|
|
119
|
+
T::Array[OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::AllowedCaller::OrSymbol]
|
|
120
|
+
)
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
attr_accessor :allowed_callers
|
|
124
|
+
|
|
125
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
126
|
+
# returned on next response creation.
|
|
127
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
128
|
+
attr_reader :async
|
|
129
|
+
|
|
130
|
+
sig { params(async: T::Boolean).void }
|
|
131
|
+
attr_writer :async
|
|
132
|
+
|
|
133
|
+
# Whether this function should be deferred and discovered via tool search.
|
|
134
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
135
|
+
attr_reader :defer_loading
|
|
136
|
+
|
|
137
|
+
sig { params(defer_loading: T::Boolean).void }
|
|
138
|
+
attr_writer :defer_loading
|
|
139
|
+
|
|
140
|
+
sig { returns(T.nilable(String)) }
|
|
141
|
+
attr_accessor :description
|
|
142
|
+
|
|
143
|
+
# A JSON Schema describing the JSON value encoded in string outputs for this
|
|
144
|
+
# function tool. This does not describe content-array outputs.
|
|
145
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
146
|
+
attr_accessor :output_schema
|
|
147
|
+
|
|
148
|
+
sig { returns(T.nilable(T.anything)) }
|
|
149
|
+
attr_accessor :parameters
|
|
150
|
+
|
|
151
|
+
# Whether to enforce strict parameter validation. If omitted, Responses attempts
|
|
152
|
+
# to use strict validation when the schema is compatible, and falls back to
|
|
153
|
+
# non-strict validation otherwise.
|
|
154
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
155
|
+
attr_accessor :strict
|
|
156
|
+
|
|
157
|
+
sig do
|
|
158
|
+
params(
|
|
159
|
+
|
|
160
|
+
name: String,
|
|
161
|
+
|
|
162
|
+
allowed_callers: T.nilable(
|
|
163
|
+
T::Array[OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::AllowedCaller::OrSymbol]
|
|
164
|
+
),
|
|
165
|
+
|
|
166
|
+
async: T::Boolean,
|
|
167
|
+
|
|
168
|
+
defer_loading: T::Boolean,
|
|
169
|
+
|
|
170
|
+
description: T.nilable(String),
|
|
171
|
+
|
|
172
|
+
output_schema: T.nilable(T::Hash[Symbol, T.anything]),
|
|
173
|
+
|
|
174
|
+
parameters: T.nilable(T.anything),
|
|
175
|
+
|
|
176
|
+
strict: T.nilable(T::Boolean),
|
|
177
|
+
|
|
178
|
+
type: Symbol
|
|
179
|
+
)
|
|
180
|
+
.returns(T.attached_class)
|
|
181
|
+
end
|
|
182
|
+
def self.new(
|
|
183
|
+
|
|
184
|
+
# The name of the loaded function tool.
|
|
185
|
+
name:,
|
|
186
|
+
|
|
187
|
+
# The tool invocation context(s).
|
|
188
|
+
allowed_callers: nil,
|
|
189
|
+
|
|
190
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
191
|
+
# returned on next response creation.
|
|
192
|
+
async: nil,
|
|
193
|
+
|
|
194
|
+
# Whether this function should be deferred and discovered via tool search.
|
|
195
|
+
defer_loading: nil,
|
|
196
|
+
|
|
197
|
+
description: nil,
|
|
198
|
+
|
|
199
|
+
# A JSON Schema describing the JSON value encoded in string outputs for this
|
|
200
|
+
# function tool. This does not describe content-array outputs.
|
|
201
|
+
output_schema: nil,
|
|
202
|
+
|
|
203
|
+
parameters: nil,
|
|
204
|
+
|
|
205
|
+
# Whether to enforce strict parameter validation. If omitted, Responses attempts
|
|
206
|
+
# to use strict validation when the schema is compatible, and falls back to
|
|
207
|
+
# non-strict validation otherwise.
|
|
208
|
+
strict: nil,
|
|
209
|
+
|
|
210
|
+
type: :function
|
|
211
|
+
)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
sig do
|
|
215
|
+
override.returns(
|
|
216
|
+
{
|
|
217
|
+
name: String,
|
|
218
|
+
type: Symbol,
|
|
219
|
+
allowed_callers: T.nilable(
|
|
220
|
+
T::Array[OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::AllowedCaller::OrSymbol]
|
|
221
|
+
),
|
|
222
|
+
async: T::Boolean,
|
|
223
|
+
defer_loading: T::Boolean,
|
|
224
|
+
description: T.nilable(String),
|
|
225
|
+
output_schema: T.nilable(T::Hash[Symbol, T.anything]),
|
|
226
|
+
parameters: T.nilable(T.anything),
|
|
227
|
+
strict: T.nilable(T::Boolean)
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
def to_hash
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
module AllowedCaller
|
|
235
|
+
extend OpenAI::Internal::Type::Enum
|
|
236
|
+
|
|
237
|
+
TaggedSymbol = T.type_alias {
|
|
238
|
+
T.all(Symbol, OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::AllowedCaller)
|
|
239
|
+
}
|
|
240
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
241
|
+
|
|
242
|
+
DIRECT = T.let(
|
|
243
|
+
:direct,
|
|
244
|
+
OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::AllowedCaller::TaggedSymbol
|
|
245
|
+
)
|
|
246
|
+
PROGRAMMATIC = T.let(
|
|
247
|
+
:programmatic,
|
|
248
|
+
OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::AllowedCaller::TaggedSymbol
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
sig {
|
|
252
|
+
override.returns(
|
|
253
|
+
T::Array[OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::AllowedCaller::TaggedSymbol]
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
def self.values
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
sig { override.returns(T::Array[OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Variants]) }
|
|
262
|
+
def self.variants
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
end
|
|
272
|
+
end
|