openai 0.17.0 → 0.18.1

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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +1 -1
  4. data/lib/openai/helpers/structured_output/array_of.rb +2 -10
  5. data/lib/openai/helpers/structured_output/base_model.rb +4 -11
  6. data/lib/openai/helpers/structured_output/json_schema_converter.rb +19 -3
  7. data/lib/openai/helpers/structured_output/union_of.rb +2 -10
  8. data/lib/openai/internal/type/array_of.rb +1 -0
  9. data/lib/openai/internal/type/base_model.rb +3 -1
  10. data/lib/openai/internal/type/converter.rb +27 -0
  11. data/lib/openai/internal/type/hash_of.rb +1 -0
  12. data/lib/openai/internal/type/union.rb +9 -7
  13. data/lib/openai/models/batch_create_params.rb +38 -1
  14. data/lib/openai/models/beta/thread_create_and_run_params.rb +2 -2
  15. data/lib/openai/models/beta/threads/run.rb +2 -2
  16. data/lib/openai/models/beta/threads/run_create_params.rb +2 -2
  17. data/lib/openai/models/chat/chat_completion.rb +6 -6
  18. data/lib/openai/models/chat/chat_completion_chunk.rb +6 -6
  19. data/lib/openai/models/chat/completion_create_params.rb +7 -7
  20. data/lib/openai/models/file_create_params.rb +37 -1
  21. data/lib/openai/models/graders/text_similarity_grader.rb +6 -5
  22. data/lib/openai/models/reasoning.rb +1 -1
  23. data/lib/openai/models/responses/response.rb +6 -8
  24. data/lib/openai/models/responses/response_create_params.rb +6 -8
  25. data/lib/openai/models/upload_create_params.rb +37 -1
  26. data/lib/openai/resources/batches.rb +3 -1
  27. data/lib/openai/resources/files.rb +4 -2
  28. data/lib/openai/resources/responses.rb +2 -2
  29. data/lib/openai/resources/uploads.rb +3 -1
  30. data/lib/openai/version.rb +1 -1
  31. data/rbi/openai/helpers/structured_output/array_of.rbi +0 -3
  32. data/rbi/openai/helpers/structured_output/json_schema_converter.rbi +10 -0
  33. data/rbi/openai/internal/type/converter.rbi +46 -0
  34. data/rbi/openai/internal/type/union.rbi +7 -2
  35. data/rbi/openai/models/batch_create_params.rbi +60 -0
  36. data/rbi/openai/models/beta/thread_create_and_run_params.rbi +3 -3
  37. data/rbi/openai/models/beta/threads/run.rbi +3 -3
  38. data/rbi/openai/models/beta/threads/run_create_params.rbi +3 -3
  39. data/rbi/openai/models/chat/chat_completion.rbi +6 -9
  40. data/rbi/openai/models/chat/chat_completion_chunk.rbi +6 -9
  41. data/rbi/openai/models/chat/completion_create_params.rbi +8 -11
  42. data/rbi/openai/models/file_create_params.rbi +56 -0
  43. data/rbi/openai/models/graders/text_similarity_grader.rbi +11 -6
  44. data/rbi/openai/models/reasoning.rbi +1 -1
  45. data/rbi/openai/models/responses/response.rbi +8 -11
  46. data/rbi/openai/models/responses/response_create_params.rbi +8 -11
  47. data/rbi/openai/models/upload_create_params.rbi +56 -0
  48. data/rbi/openai/resources/batches.rbi +5 -0
  49. data/rbi/openai/resources/beta/threads/runs.rbi +2 -2
  50. data/rbi/openai/resources/beta/threads.rbi +2 -2
  51. data/rbi/openai/resources/chat/completions.rbi +6 -8
  52. data/rbi/openai/resources/files.rbi +5 -1
  53. data/rbi/openai/resources/responses.rbi +6 -8
  54. data/rbi/openai/resources/uploads.rbi +4 -0
  55. data/sig/openai/internal/type/converter.rbs +17 -0
  56. data/sig/openai/internal/type/union.rbs +2 -2
  57. data/sig/openai/models/batch_create_params.rbs +22 -1
  58. data/sig/openai/models/file_create_params.rbs +22 -1
  59. data/sig/openai/models/graders/text_similarity_grader.rbs +3 -1
  60. data/sig/openai/models/upload_create_params.rbs +22 -1
  61. data/sig/openai/resources/batches.rbs +1 -0
  62. data/sig/openai/resources/files.rbs +1 -0
  63. data/sig/openai/resources/uploads.rbs +1 -0
  64. metadata +2 -2
@@ -182,7 +182,7 @@ module OpenAI
182
182
  optional :prompt_cache_key, String
183
183
 
184
184
  # @!attribute reasoning
185
- # **o-series models only**
185
+ # **gpt-5 and o-series models only**
186
186
  #
187
187
  # Configuration options for
188
188
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning).
@@ -209,9 +209,8 @@ module OpenAI
209
209
  # - If set to 'default', then the request will be processed with the standard
210
210
  # pricing and performance for the selected model.
211
211
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
212
- # 'priority', then the request will be processed with the corresponding service
213
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
214
- # Priority processing.
212
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
213
+ # will be processed with the corresponding service tier.
215
214
  # - When not set, the default behavior is 'auto'.
216
215
  #
217
216
  # When the `service_tier` parameter is set, the response body will include the
@@ -339,7 +338,7 @@ module OpenAI
339
338
  #
340
339
  # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
341
340
  #
342
- # @param reasoning [OpenAI::Models::Reasoning, nil] **o-series models only**
341
+ # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only**
343
342
  #
344
343
  # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
345
344
  #
@@ -458,9 +457,8 @@ module OpenAI
458
457
  # - If set to 'default', then the request will be processed with the standard
459
458
  # pricing and performance for the selected model.
460
459
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
461
- # 'priority', then the request will be processed with the corresponding service
462
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
463
- # Priority processing.
460
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
461
+ # will be processed with the corresponding service tier.
464
462
  # - When not set, the default behavior is 'auto'.
465
463
  #
466
464
  # When the `service_tier` parameter is set, the response body will include the
@@ -132,7 +132,7 @@ module OpenAI
132
132
  optional :prompt_cache_key, String
133
133
 
134
134
  # @!attribute reasoning
135
- # **o-series models only**
135
+ # **gpt-5 and o-series models only**
136
136
  #
137
137
  # Configuration options for
138
138
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning).
@@ -159,9 +159,8 @@ module OpenAI
159
159
  # - If set to 'default', then the request will be processed with the standard
160
160
  # pricing and performance for the selected model.
161
161
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
162
- # 'priority', then the request will be processed with the corresponding service
163
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
164
- # Priority processing.
162
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
163
+ # will be processed with the corresponding service tier.
165
164
  # - When not set, the default behavior is 'auto'.
166
165
  #
167
166
  # When the `service_tier` parameter is set, the response body will include the
@@ -307,7 +306,7 @@ module OpenAI
307
306
  #
308
307
  # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
309
308
  #
310
- # @param reasoning [OpenAI::Models::Reasoning, nil] **o-series models only**
309
+ # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only**
311
310
  #
312
311
  # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
313
312
  #
@@ -367,9 +366,8 @@ module OpenAI
367
366
  # - If set to 'default', then the request will be processed with the standard
368
367
  # pricing and performance for the selected model.
369
368
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
370
- # 'priority', then the request will be processed with the corresponding service
371
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
372
- # Priority processing.
369
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
370
+ # will be processed with the corresponding service tier.
373
371
  # - When not set, the default behavior is 'auto'.
374
372
  #
375
373
  # When the `service_tier` parameter is set, the response body will include the
@@ -37,7 +37,14 @@ module OpenAI
37
37
  # @return [Symbol, OpenAI::Models::FilePurpose]
38
38
  required :purpose, enum: -> { OpenAI::FilePurpose }
39
39
 
40
- # @!method initialize(bytes:, filename:, mime_type:, purpose:, request_options: {})
40
+ # @!attribute expires_after
41
+ # The expiration policy for a file. By default, files with `purpose=batch` expire
42
+ # after 30 days and all other files are persisted until they are manually deleted.
43
+ #
44
+ # @return [OpenAI::Models::UploadCreateParams::ExpiresAfter, nil]
45
+ optional :expires_after, -> { OpenAI::UploadCreateParams::ExpiresAfter }
46
+
47
+ # @!method initialize(bytes:, filename:, mime_type:, purpose:, expires_after: nil, request_options: {})
41
48
  # Some parameter documentations has been truncated, see
42
49
  # {OpenAI::Models::UploadCreateParams} for more details.
43
50
  #
@@ -49,7 +56,36 @@ module OpenAI
49
56
  #
50
57
  # @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file.
51
58
  #
59
+ # @param expires_after [OpenAI::Models::UploadCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire
60
+ #
52
61
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
62
+
63
+ class ExpiresAfter < OpenAI::Internal::Type::BaseModel
64
+ # @!attribute anchor
65
+ # Anchor timestamp after which the expiration policy applies. Supported anchors:
66
+ # `created_at`.
67
+ #
68
+ # @return [Symbol, :created_at]
69
+ required :anchor, const: :created_at
70
+
71
+ # @!attribute seconds
72
+ # The number of seconds after the anchor time that the file will expire. Must be
73
+ # between 3600 (1 hour) and 2592000 (30 days).
74
+ #
75
+ # @return [Integer]
76
+ required :seconds, Integer
77
+
78
+ # @!method initialize(seconds:, anchor: :created_at)
79
+ # Some parameter documentations has been truncated, see
80
+ # {OpenAI::Models::UploadCreateParams::ExpiresAfter} for more details.
81
+ #
82
+ # The expiration policy for a file. By default, files with `purpose=batch` expire
83
+ # after 30 days and all other files are persisted until they are manually deleted.
84
+ #
85
+ # @param seconds [Integer] The number of seconds after the anchor time that the file will expire. Must be b
86
+ #
87
+ # @param anchor [Symbol, :created_at] Anchor timestamp after which the expiration policy applies. Supported anchors: `
88
+ end
53
89
  end
54
90
  end
55
91
  end
@@ -8,7 +8,7 @@ module OpenAI
8
8
  #
9
9
  # Creates and executes a batch from an uploaded file of requests
10
10
  #
11
- # @overload create(completion_window:, endpoint:, input_file_id:, metadata: nil, request_options: {})
11
+ # @overload create(completion_window:, endpoint:, input_file_id:, metadata: nil, output_expires_after: nil, request_options: {})
12
12
  #
13
13
  # @param completion_window [Symbol, OpenAI::Models::BatchCreateParams::CompletionWindow] The time frame within which the batch should be processed. Currently only `24h`
14
14
  #
@@ -18,6 +18,8 @@ module OpenAI
18
18
  #
19
19
  # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
20
20
  #
21
+ # @param output_expires_after [OpenAI::Models::BatchCreateParams::OutputExpiresAfter] The expiration policy for the output and/or error file that are generated for a
22
+ #
21
23
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
22
24
  #
23
25
  # @return [OpenAI::Models::Batch]
@@ -8,7 +8,7 @@ module OpenAI
8
8
  #
9
9
  # Upload a file that can be used across various endpoints. Individual files can be
10
10
  # up to 512 MB, and the size of all files uploaded by one organization can be up
11
- # to 100 GB.
11
+ # to 1 TB.
12
12
  #
13
13
  # The Assistants API supports files up to 2 million tokens and of specific file
14
14
  # types. See the
@@ -28,12 +28,14 @@ module OpenAI
28
28
  # Please [contact us](https://help.openai.com/) if you need to increase these
29
29
  # storage limits.
30
30
  #
31
- # @overload create(file:, purpose:, request_options: {})
31
+ # @overload create(file:, purpose:, expires_after: nil, request_options: {})
32
32
  #
33
33
  # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The File object (not file name) to be uploaded.
34
34
  #
35
35
  # @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. One of: - `assistants`: Used in the A
36
36
  #
37
+ # @param expires_after [OpenAI::Models::FileCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire
38
+ #
37
39
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
38
40
  #
39
41
  # @return [OpenAI::Models::FileObject]
@@ -49,7 +49,7 @@ module OpenAI
49
49
  #
50
50
  # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
51
51
  #
52
- # @param reasoning [OpenAI::Models::Reasoning, nil] **o-series models only**
52
+ # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only**
53
53
  #
54
54
  # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
55
55
  #
@@ -264,7 +264,7 @@ module OpenAI
264
264
  #
265
265
  # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
266
266
  #
267
- # @param reasoning [OpenAI::Models::Reasoning, nil] **o-series models only**
267
+ # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only**
268
268
  #
269
269
  # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
270
270
  #
@@ -29,7 +29,7 @@ module OpenAI
29
29
  # the documentation on
30
30
  # [creating a File](https://platform.openai.com/docs/api-reference/files/create).
31
31
  #
32
- # @overload create(bytes:, filename:, mime_type:, purpose:, request_options: {})
32
+ # @overload create(bytes:, filename:, mime_type:, purpose:, expires_after: nil, request_options: {})
33
33
  #
34
34
  # @param bytes [Integer] The number of bytes in the file you are uploading.
35
35
  #
@@ -39,6 +39,8 @@ module OpenAI
39
39
  #
40
40
  # @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file.
41
41
  #
42
+ # @param expires_after [OpenAI::Models::UploadCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire
43
+ #
42
44
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
43
45
  #
44
46
  # @return [OpenAI::Models::Upload]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "0.17.0"
4
+ VERSION = "0.18.1"
5
5
  end
@@ -7,9 +7,6 @@ module OpenAI
7
7
  include OpenAI::Helpers::StructuredOutput::JsonSchemaConverter
8
8
 
9
9
  Elem = type_member(:out)
10
-
11
- sig { returns(String) }
12
- attr_reader :description
13
10
  end
14
11
  end
15
12
  end
@@ -46,6 +46,16 @@ module OpenAI
46
46
  def to_nilable(schema)
47
47
  end
48
48
 
49
+ # @api private
50
+ sig do
51
+ params(
52
+ schema: OpenAI::Helpers::StructuredOutput::JsonSchema,
53
+ meta: OpenAI::Internal::AnyHash
54
+ ).void
55
+ end
56
+ def assoc_meta!(schema, meta:)
57
+ end
58
+
49
59
  # @api private
50
60
  sig do
51
61
  params(
@@ -86,6 +86,52 @@ module OpenAI
86
86
  def self.type_info(spec)
87
87
  end
88
88
 
89
+ # @api private
90
+ sig do
91
+ params(
92
+ type_info:
93
+ T.any(
94
+ {
95
+ const:
96
+ T.nilable(
97
+ T.any(NilClass, T::Boolean, Integer, Float, Symbol)
98
+ ),
99
+ enum:
100
+ T.nilable(
101
+ T.proc.returns(OpenAI::Internal::Type::Converter::Input)
102
+ ),
103
+ union:
104
+ T.nilable(
105
+ T.proc.returns(OpenAI::Internal::Type::Converter::Input)
106
+ )
107
+ },
108
+ T.proc.returns(OpenAI::Internal::Type::Converter::Input),
109
+ OpenAI::Internal::Type::Converter::Input
110
+ ),
111
+ spec:
112
+ T.any(
113
+ {
114
+ const:
115
+ T.nilable(
116
+ T.any(NilClass, T::Boolean, Integer, Float, Symbol)
117
+ ),
118
+ enum:
119
+ T.nilable(
120
+ T.proc.returns(OpenAI::Internal::Type::Converter::Input)
121
+ ),
122
+ union:
123
+ T.nilable(
124
+ T.proc.returns(OpenAI::Internal::Type::Converter::Input)
125
+ )
126
+ },
127
+ T.proc.returns(OpenAI::Internal::Type::Converter::Input),
128
+ OpenAI::Internal::Type::Converter::Input
129
+ )
130
+ ).returns(OpenAI::Internal::AnyHash)
131
+ end
132
+ def self.meta_info(type_info, spec)
133
+ end
134
+
89
135
  # @api private
90
136
  sig do
91
137
  params(translate_names: T::Boolean).returns(
@@ -16,7 +16,8 @@ module OpenAI
16
16
  T::Array[
17
17
  [
18
18
  T.nilable(Symbol),
19
- T.proc.returns(OpenAI::Internal::Type::Converter::Input)
19
+ T.proc.returns(OpenAI::Internal::Type::Converter::Input),
20
+ OpenAI::Internal::AnyHash
20
21
  ]
21
22
  ]
22
23
  )
@@ -25,7 +26,11 @@ module OpenAI
25
26
  end
26
27
 
27
28
  # @api private
28
- sig { returns(T::Array[[T.nilable(Symbol), T.anything]]) }
29
+ sig do
30
+ returns(
31
+ T::Array[[T.nilable(Symbol), T.anything, OpenAI::Internal::AnyHash]]
32
+ )
33
+ end
29
34
  protected def derefed_variants
30
35
  end
31
36
 
@@ -44,6 +44,19 @@ module OpenAI
44
44
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
45
45
  attr_accessor :metadata
46
46
 
47
+ # The expiration policy for the output and/or error file that are generated for a
48
+ # batch.
49
+ sig { returns(T.nilable(OpenAI::BatchCreateParams::OutputExpiresAfter)) }
50
+ attr_reader :output_expires_after
51
+
52
+ sig do
53
+ params(
54
+ output_expires_after:
55
+ OpenAI::BatchCreateParams::OutputExpiresAfter::OrHash
56
+ ).void
57
+ end
58
+ attr_writer :output_expires_after
59
+
47
60
  sig do
48
61
  params(
49
62
  completion_window:
@@ -51,6 +64,8 @@ module OpenAI
51
64
  endpoint: OpenAI::BatchCreateParams::Endpoint::OrSymbol,
52
65
  input_file_id: String,
53
66
  metadata: T.nilable(T::Hash[Symbol, String]),
67
+ output_expires_after:
68
+ OpenAI::BatchCreateParams::OutputExpiresAfter::OrHash,
54
69
  request_options: OpenAI::RequestOptions::OrHash
55
70
  ).returns(T.attached_class)
56
71
  end
@@ -80,6 +95,9 @@ module OpenAI
80
95
  # Keys are strings with a maximum length of 64 characters. Values are strings with
81
96
  # a maximum length of 512 characters.
82
97
  metadata: nil,
98
+ # The expiration policy for the output and/or error file that are generated for a
99
+ # batch.
100
+ output_expires_after: nil,
83
101
  request_options: {}
84
102
  )
85
103
  end
@@ -92,6 +110,7 @@ module OpenAI
92
110
  endpoint: OpenAI::BatchCreateParams::Endpoint::OrSymbol,
93
111
  input_file_id: String,
94
112
  metadata: T.nilable(T::Hash[Symbol, String]),
113
+ output_expires_after: OpenAI::BatchCreateParams::OutputExpiresAfter,
95
114
  request_options: OpenAI::RequestOptions
96
115
  }
97
116
  )
@@ -165,6 +184,47 @@ module OpenAI
165
184
  def self.values
166
185
  end
167
186
  end
187
+
188
+ class OutputExpiresAfter < OpenAI::Internal::Type::BaseModel
189
+ OrHash =
190
+ T.type_alias do
191
+ T.any(
192
+ OpenAI::BatchCreateParams::OutputExpiresAfter,
193
+ OpenAI::Internal::AnyHash
194
+ )
195
+ end
196
+
197
+ # Anchor timestamp after which the expiration policy applies. Supported anchors:
198
+ # `created_at`. Note that the anchor is the file creation time, not the time the
199
+ # batch is created.
200
+ sig { returns(Symbol) }
201
+ attr_accessor :anchor
202
+
203
+ # The number of seconds after the anchor time that the file will expire. Must be
204
+ # between 3600 (1 hour) and 2592000 (30 days).
205
+ sig { returns(Integer) }
206
+ attr_accessor :seconds
207
+
208
+ # The expiration policy for the output and/or error file that are generated for a
209
+ # batch.
210
+ sig do
211
+ params(seconds: Integer, anchor: Symbol).returns(T.attached_class)
212
+ end
213
+ def self.new(
214
+ # The number of seconds after the anchor time that the file will expire. Must be
215
+ # between 3600 (1 hour) and 2592000 (30 days).
216
+ seconds:,
217
+ # Anchor timestamp after which the expiration policy applies. Supported anchors:
218
+ # `created_at`. Note that the anchor is the file creation time, not the time the
219
+ # batch is created.
220
+ anchor: :created_at
221
+ )
222
+ end
223
+
224
+ sig { override.returns({ anchor: Symbol, seconds: Integer }) }
225
+ def to_hash
226
+ end
227
+ end
168
228
  end
169
229
  end
170
230
  end
@@ -187,7 +187,7 @@ module OpenAI
187
187
  attr_accessor :top_p
188
188
 
189
189
  # Controls for how a thread will be truncated prior to the run. Use this to
190
- # control the intial context window of the run.
190
+ # control the initial context window of the run.
191
191
  sig do
192
192
  returns(
193
193
  T.nilable(
@@ -343,7 +343,7 @@ module OpenAI
343
343
  # We generally recommend altering this or temperature but not both.
344
344
  top_p: nil,
345
345
  # Controls for how a thread will be truncated prior to the run. Use this to
346
- # control the intial context window of the run.
346
+ # control the initial context window of the run.
347
347
  truncation_strategy: nil,
348
348
  request_options: {}
349
349
  )
@@ -1459,7 +1459,7 @@ module OpenAI
1459
1459
  attr_accessor :last_messages
1460
1460
 
1461
1461
  # Controls for how a thread will be truncated prior to the run. Use this to
1462
- # control the intial context window of the run.
1462
+ # control the initial context window of the run.
1463
1463
  sig do
1464
1464
  params(
1465
1465
  type:
@@ -184,7 +184,7 @@ module OpenAI
184
184
  attr_accessor :tools
185
185
 
186
186
  # Controls for how a thread will be truncated prior to the run. Use this to
187
- # control the intial context window of the run.
187
+ # control the initial context window of the run.
188
188
  sig do
189
189
  returns(T.nilable(OpenAI::Beta::Threads::Run::TruncationStrategy))
190
190
  end
@@ -375,7 +375,7 @@ module OpenAI
375
375
  # this run.
376
376
  tools:,
377
377
  # Controls for how a thread will be truncated prior to the run. Use this to
378
- # control the intial context window of the run.
378
+ # control the initial context window of the run.
379
379
  truncation_strategy:,
380
380
  # Usage statistics related to the run. This value will be `null` if the run is not
381
381
  # in a terminal state (i.e. `in_progress`, `queued`, etc.).
@@ -740,7 +740,7 @@ module OpenAI
740
740
  attr_accessor :last_messages
741
741
 
742
742
  # Controls for how a thread will be truncated prior to the run. Use this to
743
- # control the intial context window of the run.
743
+ # control the initial context window of the run.
744
744
  sig do
745
745
  params(
746
746
  type:
@@ -204,7 +204,7 @@ module OpenAI
204
204
  attr_accessor :top_p
205
205
 
206
206
  # Controls for how a thread will be truncated prior to the run. Use this to
207
- # control the intial context window of the run.
207
+ # control the initial context window of the run.
208
208
  sig do
209
209
  returns(
210
210
  T.nilable(
@@ -378,7 +378,7 @@ module OpenAI
378
378
  # We generally recommend altering this or temperature but not both.
379
379
  top_p: nil,
380
380
  # Controls for how a thread will be truncated prior to the run. Use this to
381
- # control the intial context window of the run.
381
+ # control the initial context window of the run.
382
382
  truncation_strategy: nil,
383
383
  request_options: {}
384
384
  )
@@ -803,7 +803,7 @@ module OpenAI
803
803
  attr_accessor :last_messages
804
804
 
805
805
  # Controls for how a thread will be truncated prior to the run. Use this to
806
- # control the intial context window of the run.
806
+ # control the initial context window of the run.
807
807
  sig do
808
808
  params(
809
809
  type:
@@ -40,9 +40,8 @@ module OpenAI
40
40
  # - If set to 'default', then the request will be processed with the standard
41
41
  # pricing and performance for the selected model.
42
42
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
43
- # 'priority', then the request will be processed with the corresponding service
44
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
45
- # Priority processing.
43
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
44
+ # will be processed with the corresponding service tier.
46
45
  # - When not set, the default behavior is 'auto'.
47
46
  #
48
47
  # When the `service_tier` parameter is set, the response body will include the
@@ -106,9 +105,8 @@ module OpenAI
106
105
  # - If set to 'default', then the request will be processed with the standard
107
106
  # pricing and performance for the selected model.
108
107
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
109
- # 'priority', then the request will be processed with the corresponding service
110
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
111
- # Priority processing.
108
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
109
+ # will be processed with the corresponding service tier.
112
110
  # - When not set, the default behavior is 'auto'.
113
111
  #
114
112
  # When the `service_tier` parameter is set, the response body will include the
@@ -371,9 +369,8 @@ module OpenAI
371
369
  # - If set to 'default', then the request will be processed with the standard
372
370
  # pricing and performance for the selected model.
373
371
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
374
- # 'priority', then the request will be processed with the corresponding service
375
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
376
- # Priority processing.
372
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
373
+ # will be processed with the corresponding service tier.
377
374
  # - When not set, the default behavior is 'auto'.
378
375
  #
379
376
  # When the `service_tier` parameter is set, the response body will include the
@@ -42,9 +42,8 @@ module OpenAI
42
42
  # - If set to 'default', then the request will be processed with the standard
43
43
  # pricing and performance for the selected model.
44
44
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
45
- # 'priority', then the request will be processed with the corresponding service
46
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
47
- # Priority processing.
45
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
46
+ # will be processed with the corresponding service tier.
48
47
  # - When not set, the default behavior is 'auto'.
49
48
  #
50
49
  # When the `service_tier` parameter is set, the response body will include the
@@ -121,9 +120,8 @@ module OpenAI
121
120
  # - If set to 'default', then the request will be processed with the standard
122
121
  # pricing and performance for the selected model.
123
122
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
124
- # 'priority', then the request will be processed with the corresponding service
125
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
126
- # Priority processing.
123
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
124
+ # will be processed with the corresponding service tier.
127
125
  # - When not set, the default behavior is 'auto'.
128
126
  #
129
127
  # When the `service_tier` parameter is set, the response body will include the
@@ -791,9 +789,8 @@ module OpenAI
791
789
  # - If set to 'default', then the request will be processed with the standard
792
790
  # pricing and performance for the selected model.
793
791
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
794
- # 'priority', then the request will be processed with the corresponding service
795
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
796
- # Priority processing.
792
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
793
+ # will be processed with the corresponding service tier.
797
794
  # - When not set, the default behavior is 'auto'.
798
795
  #
799
796
  # When the `service_tier` parameter is set, the response body will include the
@@ -297,9 +297,8 @@ module OpenAI
297
297
  # - If set to 'default', then the request will be processed with the standard
298
298
  # pricing and performance for the selected model.
299
299
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
300
- # 'priority', then the request will be processed with the corresponding service
301
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
302
- # Priority processing.
300
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
301
+ # will be processed with the corresponding service tier.
303
302
  # - When not set, the default behavior is 'auto'.
304
303
  #
305
304
  # When the `service_tier` parameter is set, the response body will include the
@@ -330,7 +329,7 @@ module OpenAI
330
329
  # our [model distillation](https://platform.openai.com/docs/guides/distillation)
331
330
  # or [evals](https://platform.openai.com/docs/guides/evals) products.
332
331
  #
333
- # Supports text and image inputs. Note: image inputs over 10MB will be dropped.
332
+ # Supports text and image inputs. Note: image inputs over 8MB will be dropped.
334
333
  sig { returns(T.nilable(T::Boolean)) }
335
334
  attr_accessor :store
336
335
 
@@ -700,9 +699,8 @@ module OpenAI
700
699
  # - If set to 'default', then the request will be processed with the standard
701
700
  # pricing and performance for the selected model.
702
701
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
703
- # 'priority', then the request will be processed with the corresponding service
704
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
705
- # Priority processing.
702
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
703
+ # will be processed with the corresponding service tier.
706
704
  # - When not set, the default behavior is 'auto'.
707
705
  #
708
706
  # When the `service_tier` parameter is set, the response body will include the
@@ -719,7 +717,7 @@ module OpenAI
719
717
  # our [model distillation](https://platform.openai.com/docs/guides/distillation)
720
718
  # or [evals](https://platform.openai.com/docs/guides/evals) products.
721
719
  #
722
- # Supports text and image inputs. Note: image inputs over 10MB will be dropped.
720
+ # Supports text and image inputs. Note: image inputs over 8MB will be dropped.
723
721
  store: nil,
724
722
  # Options for streaming response. Only set this when you set `stream: true`.
725
723
  stream_options: nil,
@@ -1100,9 +1098,8 @@ module OpenAI
1100
1098
  # - If set to 'default', then the request will be processed with the standard
1101
1099
  # pricing and performance for the selected model.
1102
1100
  # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
1103
- # 'priority', then the request will be processed with the corresponding service
1104
- # tier. [Contact sales](https://openai.com/contact-sales) to learn more about
1105
- # Priority processing.
1101
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
1102
+ # will be processed with the corresponding service tier.
1106
1103
  # - When not set, the default behavior is 'auto'.
1107
1104
  #
1108
1105
  # When the `service_tier` parameter is set, the response body will include the