openai 0.10.0 → 0.11.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 +20 -0
- data/README.md +79 -1
- data/lib/openai/client.rb +11 -0
- data/lib/openai/errors.rb +3 -0
- 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/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_web_search.rb +115 -1
- data/lib/openai/models/responses/response_includable.rb +8 -6
- 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 +2 -2
- data/lib/openai/resources/responses.rb +14 -6
- data/lib/openai/resources/webhooks.rb +124 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +18 -0
- data/rbi/openai/client.rbi +3 -0
- 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 +62 -38
- data/rbi/openai/resources/webhooks.rbi +68 -0
- data/sig/openai/client.rbs +2 -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 +56 -2
@@ -0,0 +1,154 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Webhooks
|
6
|
+
class ResponseFailedWebhookEvent < OpenAI::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(
|
10
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent,
|
11
|
+
OpenAI::Internal::AnyHash
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
# The unique ID of the event.
|
16
|
+
sig { returns(String) }
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# The Unix timestamp (in seconds) of when the model response failed.
|
20
|
+
sig { returns(Integer) }
|
21
|
+
attr_accessor :created_at
|
22
|
+
|
23
|
+
# Event data payload.
|
24
|
+
sig { returns(OpenAI::Webhooks::ResponseFailedWebhookEvent::Data) }
|
25
|
+
attr_reader :data
|
26
|
+
|
27
|
+
sig do
|
28
|
+
params(
|
29
|
+
data: OpenAI::Webhooks::ResponseFailedWebhookEvent::Data::OrHash
|
30
|
+
).void
|
31
|
+
end
|
32
|
+
attr_writer :data
|
33
|
+
|
34
|
+
# The type of the event. Always `response.failed`.
|
35
|
+
sig { returns(Symbol) }
|
36
|
+
attr_accessor :type
|
37
|
+
|
38
|
+
# The object of the event. Always `event`.
|
39
|
+
sig do
|
40
|
+
returns(
|
41
|
+
T.nilable(
|
42
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent::Object::TaggedSymbol
|
43
|
+
)
|
44
|
+
)
|
45
|
+
end
|
46
|
+
attr_reader :object
|
47
|
+
|
48
|
+
sig do
|
49
|
+
params(
|
50
|
+
object:
|
51
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent::Object::OrSymbol
|
52
|
+
).void
|
53
|
+
end
|
54
|
+
attr_writer :object
|
55
|
+
|
56
|
+
# Sent when a background response has failed.
|
57
|
+
sig do
|
58
|
+
params(
|
59
|
+
id: String,
|
60
|
+
created_at: Integer,
|
61
|
+
data: OpenAI::Webhooks::ResponseFailedWebhookEvent::Data::OrHash,
|
62
|
+
object:
|
63
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent::Object::OrSymbol,
|
64
|
+
type: Symbol
|
65
|
+
).returns(T.attached_class)
|
66
|
+
end
|
67
|
+
def self.new(
|
68
|
+
# The unique ID of the event.
|
69
|
+
id:,
|
70
|
+
# The Unix timestamp (in seconds) of when the model response failed.
|
71
|
+
created_at:,
|
72
|
+
# Event data payload.
|
73
|
+
data:,
|
74
|
+
# The object of the event. Always `event`.
|
75
|
+
object: nil,
|
76
|
+
# The type of the event. Always `response.failed`.
|
77
|
+
type: :"response.failed"
|
78
|
+
)
|
79
|
+
end
|
80
|
+
|
81
|
+
sig do
|
82
|
+
override.returns(
|
83
|
+
{
|
84
|
+
id: String,
|
85
|
+
created_at: Integer,
|
86
|
+
data: OpenAI::Webhooks::ResponseFailedWebhookEvent::Data,
|
87
|
+
type: Symbol,
|
88
|
+
object:
|
89
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent::Object::TaggedSymbol
|
90
|
+
}
|
91
|
+
)
|
92
|
+
end
|
93
|
+
def to_hash
|
94
|
+
end
|
95
|
+
|
96
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
97
|
+
OrHash =
|
98
|
+
T.type_alias do
|
99
|
+
T.any(
|
100
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent::Data,
|
101
|
+
OpenAI::Internal::AnyHash
|
102
|
+
)
|
103
|
+
end
|
104
|
+
|
105
|
+
# The unique ID of the model response.
|
106
|
+
sig { returns(String) }
|
107
|
+
attr_accessor :id
|
108
|
+
|
109
|
+
# Event data payload.
|
110
|
+
sig { params(id: String).returns(T.attached_class) }
|
111
|
+
def self.new(
|
112
|
+
# The unique ID of the model response.
|
113
|
+
id:
|
114
|
+
)
|
115
|
+
end
|
116
|
+
|
117
|
+
sig { override.returns({ id: String }) }
|
118
|
+
def to_hash
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# The object of the event. Always `event`.
|
123
|
+
module Object
|
124
|
+
extend OpenAI::Internal::Type::Enum
|
125
|
+
|
126
|
+
TaggedSymbol =
|
127
|
+
T.type_alias do
|
128
|
+
T.all(
|
129
|
+
Symbol,
|
130
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent::Object
|
131
|
+
)
|
132
|
+
end
|
133
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
134
|
+
|
135
|
+
EVENT =
|
136
|
+
T.let(
|
137
|
+
:event,
|
138
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent::Object::TaggedSymbol
|
139
|
+
)
|
140
|
+
|
141
|
+
sig do
|
142
|
+
override.returns(
|
143
|
+
T::Array[
|
144
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent::Object::TaggedSymbol
|
145
|
+
]
|
146
|
+
)
|
147
|
+
end
|
148
|
+
def self.values
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -0,0 +1,155 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Webhooks
|
6
|
+
class ResponseIncompleteWebhookEvent < OpenAI::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(
|
10
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent,
|
11
|
+
OpenAI::Internal::AnyHash
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
# The unique ID of the event.
|
16
|
+
sig { returns(String) }
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# The Unix timestamp (in seconds) of when the model response was interrupted.
|
20
|
+
sig { returns(Integer) }
|
21
|
+
attr_accessor :created_at
|
22
|
+
|
23
|
+
# Event data payload.
|
24
|
+
sig { returns(OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Data) }
|
25
|
+
attr_reader :data
|
26
|
+
|
27
|
+
sig do
|
28
|
+
params(
|
29
|
+
data: OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Data::OrHash
|
30
|
+
).void
|
31
|
+
end
|
32
|
+
attr_writer :data
|
33
|
+
|
34
|
+
# The type of the event. Always `response.incomplete`.
|
35
|
+
sig { returns(Symbol) }
|
36
|
+
attr_accessor :type
|
37
|
+
|
38
|
+
# The object of the event. Always `event`.
|
39
|
+
sig do
|
40
|
+
returns(
|
41
|
+
T.nilable(
|
42
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Object::TaggedSymbol
|
43
|
+
)
|
44
|
+
)
|
45
|
+
end
|
46
|
+
attr_reader :object
|
47
|
+
|
48
|
+
sig do
|
49
|
+
params(
|
50
|
+
object:
|
51
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Object::OrSymbol
|
52
|
+
).void
|
53
|
+
end
|
54
|
+
attr_writer :object
|
55
|
+
|
56
|
+
# Sent when a background response has been interrupted.
|
57
|
+
sig do
|
58
|
+
params(
|
59
|
+
id: String,
|
60
|
+
created_at: Integer,
|
61
|
+
data:
|
62
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Data::OrHash,
|
63
|
+
object:
|
64
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Object::OrSymbol,
|
65
|
+
type: Symbol
|
66
|
+
).returns(T.attached_class)
|
67
|
+
end
|
68
|
+
def self.new(
|
69
|
+
# The unique ID of the event.
|
70
|
+
id:,
|
71
|
+
# The Unix timestamp (in seconds) of when the model response was interrupted.
|
72
|
+
created_at:,
|
73
|
+
# Event data payload.
|
74
|
+
data:,
|
75
|
+
# The object of the event. Always `event`.
|
76
|
+
object: nil,
|
77
|
+
# The type of the event. Always `response.incomplete`.
|
78
|
+
type: :"response.incomplete"
|
79
|
+
)
|
80
|
+
end
|
81
|
+
|
82
|
+
sig do
|
83
|
+
override.returns(
|
84
|
+
{
|
85
|
+
id: String,
|
86
|
+
created_at: Integer,
|
87
|
+
data: OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Data,
|
88
|
+
type: Symbol,
|
89
|
+
object:
|
90
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Object::TaggedSymbol
|
91
|
+
}
|
92
|
+
)
|
93
|
+
end
|
94
|
+
def to_hash
|
95
|
+
end
|
96
|
+
|
97
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
98
|
+
OrHash =
|
99
|
+
T.type_alias do
|
100
|
+
T.any(
|
101
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Data,
|
102
|
+
OpenAI::Internal::AnyHash
|
103
|
+
)
|
104
|
+
end
|
105
|
+
|
106
|
+
# The unique ID of the model response.
|
107
|
+
sig { returns(String) }
|
108
|
+
attr_accessor :id
|
109
|
+
|
110
|
+
# Event data payload.
|
111
|
+
sig { params(id: String).returns(T.attached_class) }
|
112
|
+
def self.new(
|
113
|
+
# The unique ID of the model response.
|
114
|
+
id:
|
115
|
+
)
|
116
|
+
end
|
117
|
+
|
118
|
+
sig { override.returns({ id: String }) }
|
119
|
+
def to_hash
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# The object of the event. Always `event`.
|
124
|
+
module Object
|
125
|
+
extend OpenAI::Internal::Type::Enum
|
126
|
+
|
127
|
+
TaggedSymbol =
|
128
|
+
T.type_alias do
|
129
|
+
T.all(
|
130
|
+
Symbol,
|
131
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Object
|
132
|
+
)
|
133
|
+
end
|
134
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
135
|
+
|
136
|
+
EVENT =
|
137
|
+
T.let(
|
138
|
+
:event,
|
139
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Object::TaggedSymbol
|
140
|
+
)
|
141
|
+
|
142
|
+
sig do
|
143
|
+
override.returns(
|
144
|
+
T::Array[
|
145
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent::Object::TaggedSymbol
|
146
|
+
]
|
147
|
+
)
|
148
|
+
end
|
149
|
+
def self.values
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Webhooks
|
6
|
+
# Sent when a batch API request has been cancelled.
|
7
|
+
module UnwrapWebhookEvent
|
8
|
+
extend OpenAI::Internal::Type::Union
|
9
|
+
|
10
|
+
Variants =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
OpenAI::Webhooks::BatchCancelledWebhookEvent,
|
14
|
+
OpenAI::Webhooks::BatchCompletedWebhookEvent,
|
15
|
+
OpenAI::Webhooks::BatchExpiredWebhookEvent,
|
16
|
+
OpenAI::Webhooks::BatchFailedWebhookEvent,
|
17
|
+
OpenAI::Webhooks::EvalRunCanceledWebhookEvent,
|
18
|
+
OpenAI::Webhooks::EvalRunFailedWebhookEvent,
|
19
|
+
OpenAI::Webhooks::EvalRunSucceededWebhookEvent,
|
20
|
+
OpenAI::Webhooks::FineTuningJobCancelledWebhookEvent,
|
21
|
+
OpenAI::Webhooks::FineTuningJobFailedWebhookEvent,
|
22
|
+
OpenAI::Webhooks::FineTuningJobSucceededWebhookEvent,
|
23
|
+
OpenAI::Webhooks::ResponseCancelledWebhookEvent,
|
24
|
+
OpenAI::Webhooks::ResponseCompletedWebhookEvent,
|
25
|
+
OpenAI::Webhooks::ResponseFailedWebhookEvent,
|
26
|
+
OpenAI::Webhooks::ResponseIncompleteWebhookEvent
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
sig do
|
31
|
+
override.returns(
|
32
|
+
T::Array[OpenAI::Webhooks::UnwrapWebhookEvent::Variants]
|
33
|
+
)
|
34
|
+
end
|
35
|
+
def self.variants
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Webhooks
|
6
|
+
class WebhookUnwrapParams < OpenAI::Internal::Type::BaseModel
|
7
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
8
|
+
include OpenAI::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
OpenAI::Webhooks::WebhookUnwrapParams,
|
14
|
+
OpenAI::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig do
|
19
|
+
params(request_options: OpenAI::RequestOptions::OrHash).returns(
|
20
|
+
T.attached_class
|
21
|
+
)
|
22
|
+
end
|
23
|
+
def self.new(request_options: {})
|
24
|
+
end
|
25
|
+
|
26
|
+
sig { override.returns({ request_options: OpenAI::RequestOptions }) }
|
27
|
+
def to_hash
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/rbi/openai/models.rbi
CHANGED
@@ -228,23 +228,23 @@ module OpenAI
|
|
228
228
|
# should refer to the `system_fingerprint` response parameter to monitor changes
|
229
229
|
# in the backend.
|
230
230
|
seed: nil,
|
231
|
-
# Specifies the
|
232
|
-
#
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
236
|
-
# - If set to '
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
# tier
|
241
|
-
#
|
242
|
-
# service tier.
|
243
|
-
# [Learn more](https://platform.openai.com/docs/guides/flex-processing).
|
231
|
+
# Specifies the processing type used for serving the request.
|
232
|
+
#
|
233
|
+
# - If set to 'auto', then the request will be processed with the service tier
|
234
|
+
# configured in the Project settings. Unless otherwise configured, the Project
|
235
|
+
# will use 'default'.
|
236
|
+
# - If set to 'default', then the requset will be processed with the standard
|
237
|
+
# pricing and performance for the selected model.
|
238
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
239
|
+
# 'priority', then the request will be processed with the corresponding service
|
240
|
+
# tier. [Contact sales](https://openai.com/contact-sales) to learn more about
|
241
|
+
# Priority processing.
|
244
242
|
# - When not set, the default behavior is 'auto'.
|
245
243
|
#
|
246
|
-
# When
|
247
|
-
#
|
244
|
+
# When the `service_tier` parameter is set, the response body will include the
|
245
|
+
# `service_tier` value based on the processing mode actually used to serve the
|
246
|
+
# request. This response value may be different from the value set in the
|
247
|
+
# parameter.
|
248
248
|
service_tier: nil,
|
249
249
|
# Not supported with latest reasoning models `o3` and `o4-mini`.
|
250
250
|
#
|
@@ -254,6 +254,8 @@ module OpenAI
|
|
254
254
|
# Whether or not to store the output of this chat completion request for use in
|
255
255
|
# our [model distillation](https://platform.openai.com/docs/guides/distillation)
|
256
256
|
# or [evals](https://platform.openai.com/docs/guides/evals) products.
|
257
|
+
#
|
258
|
+
# Supports text and image inputs. Note: image inputs over 10MB will be dropped.
|
257
259
|
store: nil,
|
258
260
|
# Options for streaming response. Only set this when you set `stream: true`.
|
259
261
|
stream_options: nil,
|
@@ -515,23 +517,23 @@ module OpenAI
|
|
515
517
|
# should refer to the `system_fingerprint` response parameter to monitor changes
|
516
518
|
# in the backend.
|
517
519
|
seed: nil,
|
518
|
-
# Specifies the
|
519
|
-
#
|
520
|
-
#
|
521
|
-
#
|
522
|
-
#
|
523
|
-
# - If set to '
|
524
|
-
#
|
525
|
-
#
|
526
|
-
#
|
527
|
-
# tier
|
528
|
-
#
|
529
|
-
# service tier.
|
530
|
-
# [Learn more](https://platform.openai.com/docs/guides/flex-processing).
|
520
|
+
# Specifies the processing type used for serving the request.
|
521
|
+
#
|
522
|
+
# - If set to 'auto', then the request will be processed with the service tier
|
523
|
+
# configured in the Project settings. Unless otherwise configured, the Project
|
524
|
+
# will use 'default'.
|
525
|
+
# - If set to 'default', then the requset will be processed with the standard
|
526
|
+
# pricing and performance for the selected model.
|
527
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
528
|
+
# 'priority', then the request will be processed with the corresponding service
|
529
|
+
# tier. [Contact sales](https://openai.com/contact-sales) to learn more about
|
530
|
+
# Priority processing.
|
531
531
|
# - When not set, the default behavior is 'auto'.
|
532
532
|
#
|
533
|
-
# When
|
534
|
-
#
|
533
|
+
# When the `service_tier` parameter is set, the response body will include the
|
534
|
+
# `service_tier` value based on the processing mode actually used to serve the
|
535
|
+
# request. This response value may be different from the value set in the
|
536
|
+
# parameter.
|
535
537
|
service_tier: nil,
|
536
538
|
# Not supported with latest reasoning models `o3` and `o4-mini`.
|
537
539
|
#
|
@@ -541,6 +543,8 @@ module OpenAI
|
|
541
543
|
# Whether or not to store the output of this chat completion request for use in
|
542
544
|
# our [model distillation](https://platform.openai.com/docs/guides/distillation)
|
543
545
|
# or [evals](https://platform.openai.com/docs/guides/evals) products.
|
546
|
+
#
|
547
|
+
# Supports text and image inputs. Note: image inputs over 10MB will be dropped.
|
544
548
|
store: nil,
|
545
549
|
# Options for streaming response. Only set this when you set `stream: true`.
|
546
550
|
stream_options: nil,
|