openai 0.10.0 → 0.12.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 +36 -0
- data/README.md +83 -7
- data/lib/openai/client.rb +11 -0
- data/lib/openai/errors.rb +3 -0
- data/lib/openai/helpers/streaming/events.rb +23 -0
- data/lib/openai/helpers/streaming/response_stream.rb +232 -0
- data/lib/openai/helpers/structured_output/parsed_json.rb +39 -0
- data/lib/openai/internal/stream.rb +2 -1
- data/lib/openai/internal/transport/base_client.rb +10 -2
- data/lib/openai/internal/type/base_stream.rb +3 -1
- data/lib/openai/models/all_models.rb +4 -0
- data/lib/openai/models/chat/chat_completion.rb +32 -31
- data/lib/openai/models/chat/chat_completion_chunk.rb +30 -29
- data/lib/openai/models/chat/chat_completion_message.rb +1 -1
- data/lib/openai/models/chat/chat_completion_message_tool_call.rb +1 -1
- data/lib/openai/models/chat/completion_create_params.rb +34 -31
- data/lib/openai/models/images_response.rb +92 -1
- data/lib/openai/models/responses/response.rb +59 -35
- data/lib/openai/models/responses/response_create_params.rb +64 -39
- data/lib/openai/models/responses/response_function_tool_call.rb +1 -1
- data/lib/openai/models/responses/response_function_web_search.rb +115 -1
- data/lib/openai/models/responses/response_includable.rb +8 -6
- data/lib/openai/models/responses/response_output_text.rb +1 -1
- data/lib/openai/models/responses/tool_choice_mcp.rb +40 -0
- data/lib/openai/models/responses/tool_choice_types.rb +0 -3
- data/lib/openai/models/responses_model.rb +4 -0
- data/lib/openai/models/webhooks/batch_cancelled_webhook_event.rb +84 -0
- data/lib/openai/models/webhooks/batch_completed_webhook_event.rb +84 -0
- data/lib/openai/models/webhooks/batch_expired_webhook_event.rb +84 -0
- data/lib/openai/models/webhooks/batch_failed_webhook_event.rb +84 -0
- data/lib/openai/models/webhooks/eval_run_canceled_webhook_event.rb +84 -0
- data/lib/openai/models/webhooks/eval_run_failed_webhook_event.rb +84 -0
- data/lib/openai/models/webhooks/eval_run_succeeded_webhook_event.rb +84 -0
- data/lib/openai/models/webhooks/fine_tuning_job_cancelled_webhook_event.rb +85 -0
- data/lib/openai/models/webhooks/fine_tuning_job_failed_webhook_event.rb +85 -0
- data/lib/openai/models/webhooks/fine_tuning_job_succeeded_webhook_event.rb +85 -0
- data/lib/openai/models/webhooks/response_cancelled_webhook_event.rb +85 -0
- data/lib/openai/models/webhooks/response_completed_webhook_event.rb +85 -0
- data/lib/openai/models/webhooks/response_failed_webhook_event.rb +84 -0
- data/lib/openai/models/webhooks/response_incomplete_webhook_event.rb +85 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +59 -0
- data/lib/openai/models/webhooks/webhook_unwrap_params.rb +16 -0
- data/lib/openai/models.rb +2 -0
- data/lib/openai/resources/chat/completions.rb +14 -6
- data/lib/openai/resources/responses.rb +262 -81
- data/lib/openai/resources/webhooks.rb +124 -0
- data/lib/openai/streaming.rb +5 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +22 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/helpers/streaming/events.rbi +31 -0
- data/rbi/openai/helpers/streaming/response_stream.rbi +104 -0
- data/rbi/openai/internal/type/base_stream.rbi +8 -1
- data/rbi/openai/models/all_models.rbi +20 -0
- data/rbi/openai/models/chat/chat_completion.rbi +47 -42
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +47 -42
- data/rbi/openai/models/chat/completion_create_params.rbi +51 -42
- data/rbi/openai/models/images_response.rbi +146 -0
- data/rbi/openai/models/responses/response.rbi +75 -44
- data/rbi/openai/models/responses/response_create_params.rbi +91 -55
- data/rbi/openai/models/responses/response_function_web_search.rbi +163 -0
- data/rbi/openai/models/responses/response_includable.rbi +17 -11
- data/rbi/openai/models/responses/tool_choice_mcp.rbi +53 -0
- data/rbi/openai/models/responses/tool_choice_types.rbi +0 -5
- data/rbi/openai/models/responses_model.rbi +20 -0
- data/rbi/openai/models/webhooks/batch_cancelled_webhook_event.rbi +154 -0
- data/rbi/openai/models/webhooks/batch_completed_webhook_event.rbi +154 -0
- data/rbi/openai/models/webhooks/batch_expired_webhook_event.rbi +150 -0
- data/rbi/openai/models/webhooks/batch_failed_webhook_event.rbi +149 -0
- data/rbi/openai/models/webhooks/eval_run_canceled_webhook_event.rbi +154 -0
- data/rbi/openai/models/webhooks/eval_run_failed_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/eval_run_succeeded_webhook_event.rbi +154 -0
- data/rbi/openai/models/webhooks/fine_tuning_job_cancelled_webhook_event.rbi +158 -0
- data/rbi/openai/models/webhooks/fine_tuning_job_failed_webhook_event.rbi +156 -0
- data/rbi/openai/models/webhooks/fine_tuning_job_succeeded_webhook_event.rbi +158 -0
- data/rbi/openai/models/webhooks/response_cancelled_webhook_event.rbi +154 -0
- data/rbi/openai/models/webhooks/response_completed_webhook_event.rbi +154 -0
- data/rbi/openai/models/webhooks/response_failed_webhook_event.rbi +154 -0
- data/rbi/openai/models/webhooks/response_incomplete_webhook_event.rbi +155 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +40 -0
- data/rbi/openai/models/webhooks/webhook_unwrap_params.rbi +32 -0
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/chat/completions.rbi +34 -30
- data/rbi/openai/resources/responses.rbi +188 -39
- data/rbi/openai/resources/webhooks.rbi +68 -0
- data/rbi/openai/streaming.rbi +5 -0
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/internal/type/base_stream.rbs +4 -0
- data/sig/openai/models/all_models.rbs +8 -0
- data/sig/openai/models/chat/chat_completion.rbs +2 -1
- data/sig/openai/models/chat/chat_completion_chunk.rbs +2 -1
- data/sig/openai/models/chat/completion_create_params.rbs +2 -1
- data/sig/openai/models/images_response.rbs +83 -0
- data/sig/openai/models/responses/response.rbs +13 -1
- data/sig/openai/models/responses/response_create_params.rbs +13 -1
- data/sig/openai/models/responses/response_function_web_search.rbs +54 -0
- data/sig/openai/models/responses/response_includable.rbs +7 -5
- data/sig/openai/models/responses/tool_choice_mcp.rbs +23 -0
- data/sig/openai/models/responses/tool_choice_types.rbs +0 -2
- data/sig/openai/models/responses_model.rbs +8 -0
- data/sig/openai/models/webhooks/batch_cancelled_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/batch_completed_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/batch_expired_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/batch_failed_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/eval_run_canceled_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/eval_run_failed_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/eval_run_succeeded_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/fine_tuning_job_cancelled_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/fine_tuning_job_failed_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/fine_tuning_job_succeeded_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/response_cancelled_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/response_completed_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/response_failed_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/response_incomplete_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +27 -0
- data/sig/openai/models/webhooks/webhook_unwrap_params.rbs +17 -0
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/resources/responses.rbs +4 -0
- data/sig/openai/resources/webhooks.rbs +33 -0
- metadata +63 -2
@@ -19,12 +19,14 @@ module OpenAI
|
|
19
19
|
top_p: Float?,
|
20
20
|
background: bool?,
|
21
21
|
max_output_tokens: Integer?,
|
22
|
+
max_tool_calls: Integer?,
|
22
23
|
previous_response_id: String?,
|
23
24
|
prompt: OpenAI::Responses::ResponsePrompt?,
|
24
25
|
reasoning: OpenAI::Reasoning?,
|
25
26
|
service_tier: OpenAI::Models::Responses::Response::service_tier?,
|
26
27
|
status: OpenAI::Models::Responses::response_status,
|
27
28
|
text: OpenAI::Responses::ResponseTextConfig,
|
29
|
+
top_logprobs: Integer?,
|
28
30
|
truncation: OpenAI::Models::Responses::Response::truncation?,
|
29
31
|
usage: OpenAI::Responses::ResponseUsage,
|
30
32
|
user: String
|
@@ -63,6 +65,8 @@ module OpenAI
|
|
63
65
|
|
64
66
|
attr_accessor max_output_tokens: Integer?
|
65
67
|
|
68
|
+
attr_accessor max_tool_calls: Integer?
|
69
|
+
|
66
70
|
attr_accessor previous_response_id: String?
|
67
71
|
|
68
72
|
attr_accessor prompt: OpenAI::Responses::ResponsePrompt?
|
@@ -83,6 +87,8 @@ module OpenAI
|
|
83
87
|
OpenAI::Responses::ResponseTextConfig
|
84
88
|
) -> OpenAI::Responses::ResponseTextConfig
|
85
89
|
|
90
|
+
attr_accessor top_logprobs: Integer?
|
91
|
+
|
86
92
|
attr_accessor truncation: OpenAI::Models::Responses::Response::truncation?
|
87
93
|
|
88
94
|
attr_reader usage: OpenAI::Responses::ResponseUsage?
|
@@ -111,12 +117,14 @@ module OpenAI
|
|
111
117
|
top_p: Float?,
|
112
118
|
?background: bool?,
|
113
119
|
?max_output_tokens: Integer?,
|
120
|
+
?max_tool_calls: Integer?,
|
114
121
|
?previous_response_id: String?,
|
115
122
|
?prompt: OpenAI::Responses::ResponsePrompt?,
|
116
123
|
?reasoning: OpenAI::Reasoning?,
|
117
124
|
?service_tier: OpenAI::Models::Responses::Response::service_tier?,
|
118
125
|
?status: OpenAI::Models::Responses::response_status,
|
119
126
|
?text: OpenAI::Responses::ResponseTextConfig,
|
127
|
+
?top_logprobs: Integer?,
|
120
128
|
?truncation: OpenAI::Models::Responses::Response::truncation?,
|
121
129
|
?usage: OpenAI::Responses::ResponseUsage,
|
122
130
|
?user: String,
|
@@ -140,12 +148,14 @@ module OpenAI
|
|
140
148
|
top_p: Float?,
|
141
149
|
background: bool?,
|
142
150
|
max_output_tokens: Integer?,
|
151
|
+
max_tool_calls: Integer?,
|
143
152
|
previous_response_id: String?,
|
144
153
|
prompt: OpenAI::Responses::ResponsePrompt?,
|
145
154
|
reasoning: OpenAI::Reasoning?,
|
146
155
|
service_tier: OpenAI::Models::Responses::Response::service_tier?,
|
147
156
|
status: OpenAI::Models::Responses::response_status,
|
148
157
|
text: OpenAI::Responses::ResponseTextConfig,
|
158
|
+
top_logprobs: Integer?,
|
149
159
|
truncation: OpenAI::Models::Responses::Response::truncation?,
|
150
160
|
usage: OpenAI::Responses::ResponseUsage,
|
151
161
|
user: String
|
@@ -198,6 +208,7 @@ module OpenAI
|
|
198
208
|
OpenAI::Models::Responses::tool_choice_options
|
199
209
|
| OpenAI::Responses::ToolChoiceTypes
|
200
210
|
| OpenAI::Responses::ToolChoiceFunction
|
211
|
+
| OpenAI::Responses::ToolChoiceMcp
|
201
212
|
|
202
213
|
module ToolChoice
|
203
214
|
extend OpenAI::Internal::Type::Union
|
@@ -205,7 +216,7 @@ module OpenAI
|
|
205
216
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::Response::tool_choice]
|
206
217
|
end
|
207
218
|
|
208
|
-
type service_tier = :auto | :default | :flex | :scale
|
219
|
+
type service_tier = :auto | :default | :flex | :scale | :priority
|
209
220
|
|
210
221
|
module ServiceTier
|
211
222
|
extend OpenAI::Internal::Type::Enum
|
@@ -214,6 +225,7 @@ module OpenAI
|
|
214
225
|
DEFAULT: :default
|
215
226
|
FLEX: :flex
|
216
227
|
SCALE: :scale
|
228
|
+
PRIORITY: :priority
|
217
229
|
|
218
230
|
def self?.values: -> ::Array[OpenAI::Models::Responses::Response::service_tier]
|
219
231
|
end
|
@@ -8,6 +8,7 @@ module OpenAI
|
|
8
8
|
input: OpenAI::Models::Responses::ResponseCreateParams::input,
|
9
9
|
instructions: String?,
|
10
10
|
max_output_tokens: Integer?,
|
11
|
+
max_tool_calls: Integer?,
|
11
12
|
metadata: OpenAI::Models::metadata?,
|
12
13
|
model: OpenAI::Models::responses_model,
|
13
14
|
parallel_tool_calls: bool?,
|
@@ -20,6 +21,7 @@ module OpenAI
|
|
20
21
|
text: OpenAI::Responses::ResponseTextConfig,
|
21
22
|
tool_choice: OpenAI::Models::Responses::ResponseCreateParams::tool_choice,
|
22
23
|
tools: ::Array[OpenAI::Models::Responses::tool],
|
24
|
+
top_logprobs: Integer?,
|
23
25
|
top_p: Float?,
|
24
26
|
truncation: OpenAI::Models::Responses::ResponseCreateParams::truncation?,
|
25
27
|
user: String
|
@@ -44,6 +46,8 @@ module OpenAI
|
|
44
46
|
|
45
47
|
attr_accessor max_output_tokens: Integer?
|
46
48
|
|
49
|
+
attr_accessor max_tool_calls: Integer?
|
50
|
+
|
47
51
|
attr_accessor metadata: OpenAI::Models::metadata?
|
48
52
|
|
49
53
|
attr_reader model: OpenAI::Models::responses_model?
|
@@ -84,6 +88,8 @@ module OpenAI
|
|
84
88
|
::Array[OpenAI::Models::Responses::tool]
|
85
89
|
) -> ::Array[OpenAI::Models::Responses::tool]
|
86
90
|
|
91
|
+
attr_accessor top_logprobs: Integer?
|
92
|
+
|
87
93
|
attr_accessor top_p: Float?
|
88
94
|
|
89
95
|
attr_accessor truncation: OpenAI::Models::Responses::ResponseCreateParams::truncation?
|
@@ -98,6 +104,7 @@ module OpenAI
|
|
98
104
|
?input: OpenAI::Models::Responses::ResponseCreateParams::input,
|
99
105
|
?instructions: String?,
|
100
106
|
?max_output_tokens: Integer?,
|
107
|
+
?max_tool_calls: Integer?,
|
101
108
|
?metadata: OpenAI::Models::metadata?,
|
102
109
|
?model: OpenAI::Models::responses_model,
|
103
110
|
?parallel_tool_calls: bool?,
|
@@ -110,6 +117,7 @@ module OpenAI
|
|
110
117
|
?text: OpenAI::Responses::ResponseTextConfig,
|
111
118
|
?tool_choice: OpenAI::Models::Responses::ResponseCreateParams::tool_choice,
|
112
119
|
?tools: ::Array[OpenAI::Models::Responses::tool],
|
120
|
+
?top_logprobs: Integer?,
|
113
121
|
?top_p: Float?,
|
114
122
|
?truncation: OpenAI::Models::Responses::ResponseCreateParams::truncation?,
|
115
123
|
?user: String,
|
@@ -122,6 +130,7 @@ module OpenAI
|
|
122
130
|
input: OpenAI::Models::Responses::ResponseCreateParams::input,
|
123
131
|
instructions: String?,
|
124
132
|
max_output_tokens: Integer?,
|
133
|
+
max_tool_calls: Integer?,
|
125
134
|
metadata: OpenAI::Models::metadata?,
|
126
135
|
model: OpenAI::Models::responses_model,
|
127
136
|
parallel_tool_calls: bool?,
|
@@ -134,6 +143,7 @@ module OpenAI
|
|
134
143
|
text: OpenAI::Responses::ResponseTextConfig,
|
135
144
|
tool_choice: OpenAI::Models::Responses::ResponseCreateParams::tool_choice,
|
136
145
|
tools: ::Array[OpenAI::Models::Responses::tool],
|
146
|
+
top_logprobs: Integer?,
|
137
147
|
top_p: Float?,
|
138
148
|
truncation: OpenAI::Models::Responses::ResponseCreateParams::truncation?,
|
139
149
|
user: String,
|
@@ -148,7 +158,7 @@ module OpenAI
|
|
148
158
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::ResponseCreateParams::input]
|
149
159
|
end
|
150
160
|
|
151
|
-
type service_tier = :auto | :default | :flex | :scale
|
161
|
+
type service_tier = :auto | :default | :flex | :scale | :priority
|
152
162
|
|
153
163
|
module ServiceTier
|
154
164
|
extend OpenAI::Internal::Type::Enum
|
@@ -157,6 +167,7 @@ module OpenAI
|
|
157
167
|
DEFAULT: :default
|
158
168
|
FLEX: :flex
|
159
169
|
SCALE: :scale
|
170
|
+
PRIORITY: :priority
|
160
171
|
|
161
172
|
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseCreateParams::service_tier]
|
162
173
|
end
|
@@ -165,6 +176,7 @@ module OpenAI
|
|
165
176
|
OpenAI::Models::Responses::tool_choice_options
|
166
177
|
| OpenAI::Responses::ToolChoiceTypes
|
167
178
|
| OpenAI::Responses::ToolChoiceFunction
|
179
|
+
| OpenAI::Responses::ToolChoiceMcp
|
168
180
|
|
169
181
|
module ToolChoice
|
170
182
|
extend OpenAI::Internal::Type::Union
|
@@ -4,6 +4,7 @@ module OpenAI
|
|
4
4
|
type response_function_web_search =
|
5
5
|
{
|
6
6
|
id: String,
|
7
|
+
action: OpenAI::Models::Responses::ResponseFunctionWebSearch::action,
|
7
8
|
status: OpenAI::Models::Responses::ResponseFunctionWebSearch::status,
|
8
9
|
type: :web_search_call
|
9
10
|
}
|
@@ -11,22 +12,75 @@ module OpenAI
|
|
11
12
|
class ResponseFunctionWebSearch < OpenAI::Internal::Type::BaseModel
|
12
13
|
attr_accessor id: String
|
13
14
|
|
15
|
+
attr_accessor action: OpenAI::Models::Responses::ResponseFunctionWebSearch::action
|
16
|
+
|
14
17
|
attr_accessor status: OpenAI::Models::Responses::ResponseFunctionWebSearch::status
|
15
18
|
|
16
19
|
attr_accessor type: :web_search_call
|
17
20
|
|
18
21
|
def initialize: (
|
19
22
|
id: String,
|
23
|
+
action: OpenAI::Models::Responses::ResponseFunctionWebSearch::action,
|
20
24
|
status: OpenAI::Models::Responses::ResponseFunctionWebSearch::status,
|
21
25
|
?type: :web_search_call
|
22
26
|
) -> void
|
23
27
|
|
24
28
|
def to_hash: -> {
|
25
29
|
id: String,
|
30
|
+
action: OpenAI::Models::Responses::ResponseFunctionWebSearch::action,
|
26
31
|
status: OpenAI::Models::Responses::ResponseFunctionWebSearch::status,
|
27
32
|
type: :web_search_call
|
28
33
|
}
|
29
34
|
|
35
|
+
type action =
|
36
|
+
OpenAI::Responses::ResponseFunctionWebSearch::Action::Search
|
37
|
+
| OpenAI::Responses::ResponseFunctionWebSearch::Action::OpenPage
|
38
|
+
| OpenAI::Responses::ResponseFunctionWebSearch::Action::Find
|
39
|
+
|
40
|
+
module Action
|
41
|
+
extend OpenAI::Internal::Type::Union
|
42
|
+
|
43
|
+
type search = { query: String, type: :search }
|
44
|
+
|
45
|
+
class Search < OpenAI::Internal::Type::BaseModel
|
46
|
+
attr_accessor query: String
|
47
|
+
|
48
|
+
attr_accessor type: :search
|
49
|
+
|
50
|
+
def initialize: (query: String, ?type: :search) -> void
|
51
|
+
|
52
|
+
def to_hash: -> { query: String, type: :search }
|
53
|
+
end
|
54
|
+
|
55
|
+
type open_page = { type: :open_page, url: String }
|
56
|
+
|
57
|
+
class OpenPage < OpenAI::Internal::Type::BaseModel
|
58
|
+
attr_accessor type: :open_page
|
59
|
+
|
60
|
+
attr_accessor url: String
|
61
|
+
|
62
|
+
def initialize: (url: String, ?type: :open_page) -> void
|
63
|
+
|
64
|
+
def to_hash: -> { type: :open_page, url: String }
|
65
|
+
end
|
66
|
+
|
67
|
+
type find = { pattern: String, type: :find, url: String }
|
68
|
+
|
69
|
+
class Find < OpenAI::Internal::Type::BaseModel
|
70
|
+
attr_accessor pattern: String
|
71
|
+
|
72
|
+
attr_accessor type: :find
|
73
|
+
|
74
|
+
attr_accessor url: String
|
75
|
+
|
76
|
+
def initialize: (pattern: String, url: String, ?type: :find) -> void
|
77
|
+
|
78
|
+
def to_hash: -> { pattern: String, type: :find, url: String }
|
79
|
+
end
|
80
|
+
|
81
|
+
def self?.variants: -> ::Array[OpenAI::Models::Responses::ResponseFunctionWebSearch::action]
|
82
|
+
end
|
83
|
+
|
30
84
|
type status = :in_progress | :searching | :completed | :failed
|
31
85
|
|
32
86
|
module Status
|
@@ -2,20 +2,22 @@ module OpenAI
|
|
2
2
|
module Models
|
3
3
|
module Responses
|
4
4
|
type response_includable =
|
5
|
-
:"
|
6
|
-
| :"message.input_image.image_url"
|
5
|
+
:"code_interpreter_call.outputs"
|
7
6
|
| :"computer_call_output.output.image_url"
|
7
|
+
| :"file_search_call.results"
|
8
|
+
| :"message.input_image.image_url"
|
9
|
+
| :"message.output_text.logprobs"
|
8
10
|
| :"reasoning.encrypted_content"
|
9
|
-
| :"code_interpreter_call.outputs"
|
10
11
|
|
11
12
|
module ResponseIncludable
|
12
13
|
extend OpenAI::Internal::Type::Enum
|
13
14
|
|
15
|
+
CODE_INTERPRETER_CALL_OUTPUTS: :"code_interpreter_call.outputs"
|
16
|
+
COMPUTER_CALL_OUTPUT_OUTPUT_IMAGE_URL: :"computer_call_output.output.image_url"
|
14
17
|
FILE_SEARCH_CALL_RESULTS: :"file_search_call.results"
|
15
18
|
MESSAGE_INPUT_IMAGE_IMAGE_URL: :"message.input_image.image_url"
|
16
|
-
|
19
|
+
MESSAGE_OUTPUT_TEXT_LOGPROBS: :"message.output_text.logprobs"
|
17
20
|
REASONING_ENCRYPTED_CONTENT: :"reasoning.encrypted_content"
|
18
|
-
CODE_INTERPRETER_CALL_OUTPUTS: :"code_interpreter_call.outputs"
|
19
21
|
|
20
22
|
def self?.values: -> ::Array[OpenAI::Models::Responses::response_includable]
|
21
23
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Responses
|
4
|
+
type tool_choice_mcp = { server_label: String, type: :mcp, name: String? }
|
5
|
+
|
6
|
+
class ToolChoiceMcp < OpenAI::Internal::Type::BaseModel
|
7
|
+
attr_accessor server_label: String
|
8
|
+
|
9
|
+
attr_accessor type: :mcp
|
10
|
+
|
11
|
+
attr_accessor name: String?
|
12
|
+
|
13
|
+
def initialize: (
|
14
|
+
server_label: String,
|
15
|
+
?name: String?,
|
16
|
+
?type: :mcp
|
17
|
+
) -> void
|
18
|
+
|
19
|
+
def to_hash: -> { server_label: String, type: :mcp, name: String? }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -22,7 +22,6 @@ module OpenAI
|
|
22
22
|
| :web_search_preview_2025_03_11
|
23
23
|
| :image_generation
|
24
24
|
| :code_interpreter
|
25
|
-
| :mcp
|
26
25
|
|
27
26
|
module Type
|
28
27
|
extend OpenAI::Internal::Type::Enum
|
@@ -33,7 +32,6 @@ module OpenAI
|
|
33
32
|
WEB_SEARCH_PREVIEW_2025_03_11: :web_search_preview_2025_03_11
|
34
33
|
IMAGE_GENERATION: :image_generation
|
35
34
|
CODE_INTERPRETER: :code_interpreter
|
36
|
-
MCP: :mcp
|
37
35
|
|
38
36
|
def self?.values: -> ::Array[OpenAI::Models::Responses::ToolChoiceTypes::type_]
|
39
37
|
end
|
@@ -13,6 +13,10 @@ module OpenAI
|
|
13
13
|
| :"o1-pro-2025-03-19"
|
14
14
|
| :"o3-pro"
|
15
15
|
| :"o3-pro-2025-06-10"
|
16
|
+
| :"o3-deep-research"
|
17
|
+
| :"o3-deep-research-2025-06-26"
|
18
|
+
| :"o4-mini-deep-research"
|
19
|
+
| :"o4-mini-deep-research-2025-06-26"
|
16
20
|
| :"computer-use-preview"
|
17
21
|
| :"computer-use-preview-2025-03-11"
|
18
22
|
|
@@ -23,6 +27,10 @@ module OpenAI
|
|
23
27
|
O1_PRO_2025_03_19: :"o1-pro-2025-03-19"
|
24
28
|
O3_PRO: :"o3-pro"
|
25
29
|
O3_PRO_2025_06_10: :"o3-pro-2025-06-10"
|
30
|
+
O3_DEEP_RESEARCH: :"o3-deep-research"
|
31
|
+
O3_DEEP_RESEARCH_2025_06_26: :"o3-deep-research-2025-06-26"
|
32
|
+
O4_MINI_DEEP_RESEARCH: :"o4-mini-deep-research"
|
33
|
+
O4_MINI_DEEP_RESEARCH_2025_06_26: :"o4-mini-deep-research-2025-06-26"
|
26
34
|
COMPUTER_USE_PREVIEW: :"computer-use-preview"
|
27
35
|
COMPUTER_USE_PREVIEW_2025_03_11: :"computer-use-preview-2025-03-11"
|
28
36
|
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Webhooks
|
4
|
+
type batch_cancelled_webhook_event =
|
5
|
+
{
|
6
|
+
id: String,
|
7
|
+
created_at: Integer,
|
8
|
+
data: OpenAI::Webhooks::BatchCancelledWebhookEvent::Data,
|
9
|
+
type: :"batch.cancelled",
|
10
|
+
object: OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::object
|
11
|
+
}
|
12
|
+
|
13
|
+
class BatchCancelledWebhookEvent < OpenAI::Internal::Type::BaseModel
|
14
|
+
attr_accessor id: String
|
15
|
+
|
16
|
+
attr_accessor created_at: Integer
|
17
|
+
|
18
|
+
attr_accessor data: OpenAI::Webhooks::BatchCancelledWebhookEvent::Data
|
19
|
+
|
20
|
+
attr_accessor type: :"batch.cancelled"
|
21
|
+
|
22
|
+
attr_reader object: OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::object?
|
23
|
+
|
24
|
+
def object=: (
|
25
|
+
OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::object
|
26
|
+
) -> OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::object
|
27
|
+
|
28
|
+
def initialize: (
|
29
|
+
id: String,
|
30
|
+
created_at: Integer,
|
31
|
+
data: OpenAI::Webhooks::BatchCancelledWebhookEvent::Data,
|
32
|
+
?object: OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::object,
|
33
|
+
?type: :"batch.cancelled"
|
34
|
+
) -> void
|
35
|
+
|
36
|
+
def to_hash: -> {
|
37
|
+
id: String,
|
38
|
+
created_at: Integer,
|
39
|
+
data: OpenAI::Webhooks::BatchCancelledWebhookEvent::Data,
|
40
|
+
type: :"batch.cancelled",
|
41
|
+
object: OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::object
|
42
|
+
}
|
43
|
+
|
44
|
+
type data = { id: String }
|
45
|
+
|
46
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
47
|
+
attr_accessor id: String
|
48
|
+
|
49
|
+
def initialize: (id: String) -> void
|
50
|
+
|
51
|
+
def to_hash: -> { id: String }
|
52
|
+
end
|
53
|
+
|
54
|
+
type object = :event
|
55
|
+
|
56
|
+
module Object
|
57
|
+
extend OpenAI::Internal::Type::Enum
|
58
|
+
|
59
|
+
EVENT: :event
|
60
|
+
|
61
|
+
def self?.values: -> ::Array[OpenAI::Models::Webhooks::BatchCancelledWebhookEvent::object]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Webhooks
|
4
|
+
type batch_completed_webhook_event =
|
5
|
+
{
|
6
|
+
id: String,
|
7
|
+
created_at: Integer,
|
8
|
+
data: OpenAI::Webhooks::BatchCompletedWebhookEvent::Data,
|
9
|
+
type: :"batch.completed",
|
10
|
+
object: OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::object
|
11
|
+
}
|
12
|
+
|
13
|
+
class BatchCompletedWebhookEvent < OpenAI::Internal::Type::BaseModel
|
14
|
+
attr_accessor id: String
|
15
|
+
|
16
|
+
attr_accessor created_at: Integer
|
17
|
+
|
18
|
+
attr_accessor data: OpenAI::Webhooks::BatchCompletedWebhookEvent::Data
|
19
|
+
|
20
|
+
attr_accessor type: :"batch.completed"
|
21
|
+
|
22
|
+
attr_reader object: OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::object?
|
23
|
+
|
24
|
+
def object=: (
|
25
|
+
OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::object
|
26
|
+
) -> OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::object
|
27
|
+
|
28
|
+
def initialize: (
|
29
|
+
id: String,
|
30
|
+
created_at: Integer,
|
31
|
+
data: OpenAI::Webhooks::BatchCompletedWebhookEvent::Data,
|
32
|
+
?object: OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::object,
|
33
|
+
?type: :"batch.completed"
|
34
|
+
) -> void
|
35
|
+
|
36
|
+
def to_hash: -> {
|
37
|
+
id: String,
|
38
|
+
created_at: Integer,
|
39
|
+
data: OpenAI::Webhooks::BatchCompletedWebhookEvent::Data,
|
40
|
+
type: :"batch.completed",
|
41
|
+
object: OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::object
|
42
|
+
}
|
43
|
+
|
44
|
+
type data = { id: String }
|
45
|
+
|
46
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
47
|
+
attr_accessor id: String
|
48
|
+
|
49
|
+
def initialize: (id: String) -> void
|
50
|
+
|
51
|
+
def to_hash: -> { id: String }
|
52
|
+
end
|
53
|
+
|
54
|
+
type object = :event
|
55
|
+
|
56
|
+
module Object
|
57
|
+
extend OpenAI::Internal::Type::Enum
|
58
|
+
|
59
|
+
EVENT: :event
|
60
|
+
|
61
|
+
def self?.values: -> ::Array[OpenAI::Models::Webhooks::BatchCompletedWebhookEvent::object]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Webhooks
|
4
|
+
type batch_expired_webhook_event =
|
5
|
+
{
|
6
|
+
id: String,
|
7
|
+
created_at: Integer,
|
8
|
+
data: OpenAI::Webhooks::BatchExpiredWebhookEvent::Data,
|
9
|
+
type: :"batch.expired",
|
10
|
+
object: OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::object
|
11
|
+
}
|
12
|
+
|
13
|
+
class BatchExpiredWebhookEvent < OpenAI::Internal::Type::BaseModel
|
14
|
+
attr_accessor id: String
|
15
|
+
|
16
|
+
attr_accessor created_at: Integer
|
17
|
+
|
18
|
+
attr_accessor data: OpenAI::Webhooks::BatchExpiredWebhookEvent::Data
|
19
|
+
|
20
|
+
attr_accessor type: :"batch.expired"
|
21
|
+
|
22
|
+
attr_reader object: OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::object?
|
23
|
+
|
24
|
+
def object=: (
|
25
|
+
OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::object
|
26
|
+
) -> OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::object
|
27
|
+
|
28
|
+
def initialize: (
|
29
|
+
id: String,
|
30
|
+
created_at: Integer,
|
31
|
+
data: OpenAI::Webhooks::BatchExpiredWebhookEvent::Data,
|
32
|
+
?object: OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::object,
|
33
|
+
?type: :"batch.expired"
|
34
|
+
) -> void
|
35
|
+
|
36
|
+
def to_hash: -> {
|
37
|
+
id: String,
|
38
|
+
created_at: Integer,
|
39
|
+
data: OpenAI::Webhooks::BatchExpiredWebhookEvent::Data,
|
40
|
+
type: :"batch.expired",
|
41
|
+
object: OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::object
|
42
|
+
}
|
43
|
+
|
44
|
+
type data = { id: String }
|
45
|
+
|
46
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
47
|
+
attr_accessor id: String
|
48
|
+
|
49
|
+
def initialize: (id: String) -> void
|
50
|
+
|
51
|
+
def to_hash: -> { id: String }
|
52
|
+
end
|
53
|
+
|
54
|
+
type object = :event
|
55
|
+
|
56
|
+
module Object
|
57
|
+
extend OpenAI::Internal::Type::Enum
|
58
|
+
|
59
|
+
EVENT: :event
|
60
|
+
|
61
|
+
def self?.values: -> ::Array[OpenAI::Models::Webhooks::BatchExpiredWebhookEvent::object]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Webhooks
|
4
|
+
type batch_failed_webhook_event =
|
5
|
+
{
|
6
|
+
id: String,
|
7
|
+
created_at: Integer,
|
8
|
+
data: OpenAI::Webhooks::BatchFailedWebhookEvent::Data,
|
9
|
+
type: :"batch.failed",
|
10
|
+
object: OpenAI::Models::Webhooks::BatchFailedWebhookEvent::object
|
11
|
+
}
|
12
|
+
|
13
|
+
class BatchFailedWebhookEvent < OpenAI::Internal::Type::BaseModel
|
14
|
+
attr_accessor id: String
|
15
|
+
|
16
|
+
attr_accessor created_at: Integer
|
17
|
+
|
18
|
+
attr_accessor data: OpenAI::Webhooks::BatchFailedWebhookEvent::Data
|
19
|
+
|
20
|
+
attr_accessor type: :"batch.failed"
|
21
|
+
|
22
|
+
attr_reader object: OpenAI::Models::Webhooks::BatchFailedWebhookEvent::object?
|
23
|
+
|
24
|
+
def object=: (
|
25
|
+
OpenAI::Models::Webhooks::BatchFailedWebhookEvent::object
|
26
|
+
) -> OpenAI::Models::Webhooks::BatchFailedWebhookEvent::object
|
27
|
+
|
28
|
+
def initialize: (
|
29
|
+
id: String,
|
30
|
+
created_at: Integer,
|
31
|
+
data: OpenAI::Webhooks::BatchFailedWebhookEvent::Data,
|
32
|
+
?object: OpenAI::Models::Webhooks::BatchFailedWebhookEvent::object,
|
33
|
+
?type: :"batch.failed"
|
34
|
+
) -> void
|
35
|
+
|
36
|
+
def to_hash: -> {
|
37
|
+
id: String,
|
38
|
+
created_at: Integer,
|
39
|
+
data: OpenAI::Webhooks::BatchFailedWebhookEvent::Data,
|
40
|
+
type: :"batch.failed",
|
41
|
+
object: OpenAI::Models::Webhooks::BatchFailedWebhookEvent::object
|
42
|
+
}
|
43
|
+
|
44
|
+
type data = { id: String }
|
45
|
+
|
46
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
47
|
+
attr_accessor id: String
|
48
|
+
|
49
|
+
def initialize: (id: String) -> void
|
50
|
+
|
51
|
+
def to_hash: -> { id: String }
|
52
|
+
end
|
53
|
+
|
54
|
+
type object = :event
|
55
|
+
|
56
|
+
module Object
|
57
|
+
extend OpenAI::Internal::Type::Enum
|
58
|
+
|
59
|
+
EVENT: :event
|
60
|
+
|
61
|
+
def self?.values: -> ::Array[OpenAI::Models::Webhooks::BatchFailedWebhookEvent::object]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Webhooks
|
4
|
+
type eval_run_canceled_webhook_event =
|
5
|
+
{
|
6
|
+
id: String,
|
7
|
+
created_at: Integer,
|
8
|
+
data: OpenAI::Webhooks::EvalRunCanceledWebhookEvent::Data,
|
9
|
+
type: :"eval.run.canceled",
|
10
|
+
object: OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::object
|
11
|
+
}
|
12
|
+
|
13
|
+
class EvalRunCanceledWebhookEvent < OpenAI::Internal::Type::BaseModel
|
14
|
+
attr_accessor id: String
|
15
|
+
|
16
|
+
attr_accessor created_at: Integer
|
17
|
+
|
18
|
+
attr_accessor data: OpenAI::Webhooks::EvalRunCanceledWebhookEvent::Data
|
19
|
+
|
20
|
+
attr_accessor type: :"eval.run.canceled"
|
21
|
+
|
22
|
+
attr_reader object: OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::object?
|
23
|
+
|
24
|
+
def object=: (
|
25
|
+
OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::object
|
26
|
+
) -> OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::object
|
27
|
+
|
28
|
+
def initialize: (
|
29
|
+
id: String,
|
30
|
+
created_at: Integer,
|
31
|
+
data: OpenAI::Webhooks::EvalRunCanceledWebhookEvent::Data,
|
32
|
+
?object: OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::object,
|
33
|
+
?type: :"eval.run.canceled"
|
34
|
+
) -> void
|
35
|
+
|
36
|
+
def to_hash: -> {
|
37
|
+
id: String,
|
38
|
+
created_at: Integer,
|
39
|
+
data: OpenAI::Webhooks::EvalRunCanceledWebhookEvent::Data,
|
40
|
+
type: :"eval.run.canceled",
|
41
|
+
object: OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::object
|
42
|
+
}
|
43
|
+
|
44
|
+
type data = { id: String }
|
45
|
+
|
46
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
47
|
+
attr_accessor id: String
|
48
|
+
|
49
|
+
def initialize: (id: String) -> void
|
50
|
+
|
51
|
+
def to_hash: -> { id: String }
|
52
|
+
end
|
53
|
+
|
54
|
+
type object = :event
|
55
|
+
|
56
|
+
module Object
|
57
|
+
extend OpenAI::Internal::Type::Enum
|
58
|
+
|
59
|
+
EVENT: :event
|
60
|
+
|
61
|
+
def self?.values: -> ::Array[OpenAI::Models::Webhooks::EvalRunCanceledWebhookEvent::object]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|