openai 0.43.0 → 0.45.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 +41 -0
- data/README.md +11 -11
- data/lib/openai/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/openai/models/beta/assistant.rb +2 -0
- data/lib/openai/models/file_create_params.rb +9 -5
- data/lib/openai/models/file_purpose.rb +8 -4
- data/lib/openai/models/realtime/conversation_item_create_event.rb +9 -5
- data/lib/openai/models/realtime/response_function_call_arguments_done_event.rb +9 -1
- data/lib/openai/models/responses/response_computer_tool_call.rb +6 -6
- data/lib/openai/models/responses/response_function_shell_tool_call_output.rb +25 -1
- data/lib/openai/models/responses/response_function_web_search.rb +15 -15
- data/lib/openai/models/responses/response_input_item.rb +27 -1
- data/lib/openai/models/responses/tool.rb +26 -1
- data/lib/openai/resources/beta/assistants.rb +10 -0
- data/lib/openai/resources/files.rb +3 -3
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/file_create_params.rbi +16 -8
- data/rbi/openai/models/file_purpose.rbi +8 -4
- data/rbi/openai/models/realtime/conversation_item_create_event.rbi +16 -8
- data/rbi/openai/models/realtime/response_function_call_arguments_done_event.rbi +8 -0
- data/rbi/openai/models/responses/response_function_shell_tool_call_output.rbi +57 -0
- data/rbi/openai/models/responses/response_function_web_search.rbi +13 -9
- data/rbi/openai/models/responses/response_input_item.rbi +61 -1
- data/rbi/openai/models/responses/tool.rbi +65 -0
- data/rbi/openai/resources/files.rbi +10 -6
- data/sig/openai/models/realtime/response_function_call_arguments_done_event.rbs +5 -0
- data/sig/openai/models/responses/response_function_shell_tool_call_output.rbs +17 -0
- data/sig/openai/models/responses/response_function_web_search.rbs +17 -8
- data/sig/openai/models/responses/response_input_item.rbs +19 -2
- data/sig/openai/models/responses/tool.rbs +24 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 10373778f29256c14ae2a86c73559f1666fead459817c6261b4960c64d0a8c6e
|
|
4
|
+
data.tar.gz: d923d898c5f7adcd2430cfa8baf05a7b76bb0b4450ed7a808e4cb85d5cb49b9c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5131c4e4918e766e222df46cffd15582461fa8dd677a55ae2e6602c0283ed3c6a48682b562dbf1135573329fa295d4b4e2ac2bb52897b032dd5297c5ff85e191
|
|
7
|
+
data.tar.gz: c13000c1ad47d32f6c4fad58b2974f3dec4dfb58a751e34d4c76da1cb032391439fdc07f4f8a8052b1c8e7fe1dc181567c26acdacf65cb09b30376b8167598aa
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.45.0 (2026-02-04)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.44.0...v0.45.0](https://github.com/openai/openai-ruby/compare/v0.44.0...v0.45.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add shell_call_output status field ([b235617](https://github.com/openai/openai-ruby/commit/b2356174e90b573b98f16a3176a51cc2b4a108b4))
|
|
10
|
+
* **api:** image generation actions for responses; ResponseFunctionCallArgumentsDoneEvent.name ([da359de](https://github.com/openai/openai-ruby/commit/da359de522a5532b287094b04f625248687d08f3))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **client:** always add content-length to post body, even when empty ([b6faa94](https://github.com/openai/openai-ruby/commit/b6faa94ec4454515c576c067a584e2a62fa33666))
|
|
16
|
+
* **client:** undo change to web search Find action ([e10a7dd](https://github.com/openai/openai-ruby/commit/e10a7dd8f601a66b5b1e7c769623f51f9e191a9f))
|
|
17
|
+
* **client:** update type for `find_in_page` action ([dd727fa](https://github.com/openai/openai-ruby/commit/dd727fadbd82ae42181fae53582043809e4dd391))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
|
|
22
|
+
* **client:** improve example values ([3c8e152](https://github.com/openai/openai-ruby/commit/3c8e1520fd7bea47442814fe2a4196c68f2062c7))
|
|
23
|
+
* **docs:** remove www prefix ([6ef56a3](https://github.com/openai/openai-ruby/commit/6ef56a36260ed01f4ea302ae69a73aed366e5e94))
|
|
24
|
+
|
|
25
|
+
## 0.44.0 (2026-01-27)
|
|
26
|
+
|
|
27
|
+
Full Changelog: [v0.43.0...v0.44.0](https://github.com/openai/openai-ruby/compare/v0.43.0...v0.44.0)
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* **api:** api update ([407360e](https://github.com/openai/openai-ruby/commit/407360eb65bd70de1e4398e2b892624d0d674ea9))
|
|
32
|
+
* **api:** api updates ([d3b882e](https://github.com/openai/openai-ruby/commit/d3b882ec9547197583f8002395842cc861b08774))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **api:** mark assistants as deprecated ([5baf7da](https://github.com/openai/openai-ruby/commit/5baf7dab0fecd0fb64720ce586377e9999d76b9e))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Chores
|
|
41
|
+
|
|
42
|
+
* **internal:** update `actions/checkout` version ([78251bd](https://github.com/openai/openai-ruby/commit/78251bd3cdaccc09f57feda8ee5b73cab03d6625))
|
|
43
|
+
|
|
3
44
|
## 0.43.0 (2026-01-09)
|
|
4
45
|
|
|
5
46
|
Full Changelog: [v0.42.0...v0.43.0](https://github.com/openai/openai-ruby/compare/v0.42.0...v0.43.0)
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
15
15
|
<!-- x-release-please-start-version -->
|
|
16
16
|
|
|
17
17
|
```ruby
|
|
18
|
-
gem "openai", "~> 0.
|
|
18
|
+
gem "openai", "~> 0.45.0"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
<!-- x-release-please-end -->
|
|
@@ -30,7 +30,7 @@ openai = OpenAI::Client.new(
|
|
|
30
30
|
api_key: ENV["OPENAI_API_KEY"] # This is the default and can be omitted
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
chat_completion = openai.chat.completions.create(messages: [{role: "user", content: "Say this is a test"}], model: "gpt-
|
|
33
|
+
chat_completion = openai.chat.completions.create(messages: [{role: "user", content: "Say this is a test"}], model: "gpt-5.2")
|
|
34
34
|
|
|
35
35
|
puts(chat_completion)
|
|
36
36
|
```
|
|
@@ -42,7 +42,7 @@ We provide support for streaming responses using Server-Sent Events (SSE).
|
|
|
42
42
|
```ruby
|
|
43
43
|
stream = openai.responses.stream(
|
|
44
44
|
input: "Write a haiku about OpenAI.",
|
|
45
|
-
model: "gpt-
|
|
45
|
+
model: "gpt-5.2"
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
stream.each do |event|
|
|
@@ -211,7 +211,7 @@ end
|
|
|
211
211
|
client = OpenAI::Client.new
|
|
212
212
|
|
|
213
213
|
response = client.responses.create(
|
|
214
|
-
model: "gpt-
|
|
214
|
+
model: "gpt-5.2",
|
|
215
215
|
input: [
|
|
216
216
|
{role: :system, content: "Extract the event information."},
|
|
217
217
|
{
|
|
@@ -247,7 +247,7 @@ To make the equivalent request using raw JSON schema format, you would do the fo
|
|
|
247
247
|
|
|
248
248
|
```ruby
|
|
249
249
|
response = client.responses.create(
|
|
250
|
-
model: "gpt-
|
|
250
|
+
model: "gpt-5.2",
|
|
251
251
|
input: [
|
|
252
252
|
{role: :system, content: "Extract the event information."},
|
|
253
253
|
{
|
|
@@ -340,7 +340,7 @@ openai = OpenAI::Client.new(
|
|
|
340
340
|
# Or, configure per-request:
|
|
341
341
|
openai.chat.completions.create(
|
|
342
342
|
messages: [{role: "user", content: "How can I get the name of the current day in JavaScript?"}],
|
|
343
|
-
model: "gpt-
|
|
343
|
+
model: "gpt-5.2",
|
|
344
344
|
request_options: {max_retries: 5}
|
|
345
345
|
)
|
|
346
346
|
```
|
|
@@ -358,7 +358,7 @@ openai = OpenAI::Client.new(
|
|
|
358
358
|
# Or, configure per-request:
|
|
359
359
|
openai.chat.completions.create(
|
|
360
360
|
messages: [{role: "user", content: "How can I list all files in a directory using Python?"}],
|
|
361
|
-
model: "gpt-
|
|
361
|
+
model: "gpt-5.2",
|
|
362
362
|
request_options: {timeout: 5}
|
|
363
363
|
)
|
|
364
364
|
```
|
|
@@ -393,7 +393,7 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
|
|
|
393
393
|
chat_completion =
|
|
394
394
|
openai.chat.completions.create(
|
|
395
395
|
messages: [{role: "user", content: "How can I get the name of the current day in JavaScript?"}],
|
|
396
|
-
model: "gpt-
|
|
396
|
+
model: "gpt-5.2",
|
|
397
397
|
request_options: {
|
|
398
398
|
extra_query: {my_query_parameter: value},
|
|
399
399
|
extra_body: {my_body_parameter: value},
|
|
@@ -441,7 +441,7 @@ You can provide typesafe request parameters like so:
|
|
|
441
441
|
```ruby
|
|
442
442
|
openai.chat.completions.create(
|
|
443
443
|
messages: [OpenAI::Chat::ChatCompletionUserMessageParam.new(content: "Say this is a test")],
|
|
444
|
-
model: "gpt-
|
|
444
|
+
model: "gpt-5.2"
|
|
445
445
|
)
|
|
446
446
|
```
|
|
447
447
|
|
|
@@ -449,12 +449,12 @@ Or, equivalently:
|
|
|
449
449
|
|
|
450
450
|
```ruby
|
|
451
451
|
# Hashes work, but are not typesafe:
|
|
452
|
-
openai.chat.completions.create(messages: [{role: "user", content: "Say this is a test"}], model: "gpt-
|
|
452
|
+
openai.chat.completions.create(messages: [{role: "user", content: "Say this is a test"}], model: "gpt-5.2")
|
|
453
453
|
|
|
454
454
|
# You can also splat a full Params class:
|
|
455
455
|
params = OpenAI::Chat::CompletionCreateParams.new(
|
|
456
456
|
messages: [OpenAI::Chat::ChatCompletionUserMessageParam.new(content: "Say this is a test")],
|
|
457
|
-
model: "gpt-
|
|
457
|
+
model: "gpt-5.2"
|
|
458
458
|
)
|
|
459
459
|
openai.chat.completions.create(**params)
|
|
460
460
|
```
|
|
@@ -75,7 +75,7 @@ module OpenAI
|
|
|
75
75
|
|
|
76
76
|
case body
|
|
77
77
|
in nil
|
|
78
|
-
|
|
78
|
+
req["content-length"] ||= 0 unless req["transfer-encoding"]
|
|
79
79
|
in String
|
|
80
80
|
req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
|
|
81
81
|
req.body_stream = OpenAI::Internal::Util::ReadIOAdapter.new(body, &blk)
|
|
@@ -14,10 +14,14 @@ module OpenAI
|
|
|
14
14
|
required :file, OpenAI::Internal::Type::FileInput
|
|
15
15
|
|
|
16
16
|
# @!attribute purpose
|
|
17
|
-
# The intended purpose of the uploaded file. One of:
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
17
|
+
# The intended purpose of the uploaded file. One of:
|
|
18
|
+
#
|
|
19
|
+
# - `assistants`: Used in the Assistants API
|
|
20
|
+
# - `batch`: Used in the Batch API
|
|
21
|
+
# - `fine-tune`: Used for fine-tuning
|
|
22
|
+
# - `vision`: Images used for vision fine-tuning
|
|
23
|
+
# - `user_data`: Flexible file type for any purpose
|
|
24
|
+
# - `evals`: Used for eval data sets
|
|
21
25
|
#
|
|
22
26
|
# @return [Symbol, OpenAI::Models::FilePurpose]
|
|
23
27
|
required :purpose, enum: -> { OpenAI::FilePurpose }
|
|
@@ -35,7 +39,7 @@ module OpenAI
|
|
|
35
39
|
#
|
|
36
40
|
# @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The File object (not file name) to be uploaded.
|
|
37
41
|
#
|
|
38
|
-
# @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. One of:
|
|
42
|
+
# @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. One of:
|
|
39
43
|
#
|
|
40
44
|
# @param expires_after [OpenAI::Models::FileCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire
|
|
41
45
|
#
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module OpenAI
|
|
4
4
|
module Models
|
|
5
|
-
# The intended purpose of the uploaded file. One of:
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
5
|
+
# The intended purpose of the uploaded file. One of:
|
|
6
|
+
#
|
|
7
|
+
# - `assistants`: Used in the Assistants API
|
|
8
|
+
# - `batch`: Used in the Batch API
|
|
9
|
+
# - `fine-tune`: Used for fine-tuning
|
|
10
|
+
# - `vision`: Images used for vision fine-tuning
|
|
11
|
+
# - `user_data`: Flexible file type for any purpose
|
|
12
|
+
# - `evals`: Used for eval data sets
|
|
9
13
|
module FilePurpose
|
|
10
14
|
extend OpenAI::Internal::Type::Enum
|
|
11
15
|
|
|
@@ -24,10 +24,14 @@ module OpenAI
|
|
|
24
24
|
|
|
25
25
|
# @!attribute previous_item_id
|
|
26
26
|
# The ID of the preceding item after which the new item will be inserted. If not
|
|
27
|
-
# set, the new item will be appended to the end of the conversation.
|
|
28
|
-
#
|
|
29
|
-
# to
|
|
30
|
-
#
|
|
27
|
+
# set, the new item will be appended to the end of the conversation.
|
|
28
|
+
#
|
|
29
|
+
# If set to `root`, the new item will be added to the beginning of the
|
|
30
|
+
# conversation.
|
|
31
|
+
#
|
|
32
|
+
# If set to an existing ID, it allows an item to be inserted mid-conversation. If
|
|
33
|
+
# the ID cannot be found, an error will be returned and the item will not be
|
|
34
|
+
# added.
|
|
31
35
|
#
|
|
32
36
|
# @return [String, nil]
|
|
33
37
|
optional :previous_item_id, String
|
|
@@ -48,7 +52,7 @@ module OpenAI
|
|
|
48
52
|
#
|
|
49
53
|
# @param event_id [String] Optional client-generated ID used to identify this event.
|
|
50
54
|
#
|
|
51
|
-
# @param previous_item_id [String] The ID of the preceding item after which the new item will be inserted.
|
|
55
|
+
# @param previous_item_id [String] The ID of the preceding item after which the new item will be inserted. If not s
|
|
52
56
|
#
|
|
53
57
|
# @param type [Symbol, :"conversation.item.create"] The event type, must be `conversation.item.create`.
|
|
54
58
|
end
|
|
@@ -28,6 +28,12 @@ module OpenAI
|
|
|
28
28
|
# @return [String]
|
|
29
29
|
required :item_id, String
|
|
30
30
|
|
|
31
|
+
# @!attribute name
|
|
32
|
+
# The name of the function that was called.
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :name, String
|
|
36
|
+
|
|
31
37
|
# @!attribute output_index
|
|
32
38
|
# The index of the output item in the response.
|
|
33
39
|
#
|
|
@@ -46,7 +52,7 @@ module OpenAI
|
|
|
46
52
|
# @return [Symbol, :"response.function_call_arguments.done"]
|
|
47
53
|
required :type, const: :"response.function_call_arguments.done"
|
|
48
54
|
|
|
49
|
-
# @!method initialize(arguments:, call_id:, event_id:, item_id:, output_index:, response_id:, type: :"response.function_call_arguments.done")
|
|
55
|
+
# @!method initialize(arguments:, call_id:, event_id:, item_id:, name:, output_index:, response_id:, type: :"response.function_call_arguments.done")
|
|
50
56
|
# Some parameter documentations has been truncated, see
|
|
51
57
|
# {OpenAI::Models::Realtime::ResponseFunctionCallArgumentsDoneEvent} for more
|
|
52
58
|
# details.
|
|
@@ -62,6 +68,8 @@ module OpenAI
|
|
|
62
68
|
#
|
|
63
69
|
# @param item_id [String] The ID of the function call item.
|
|
64
70
|
#
|
|
71
|
+
# @param name [String] The name of the function that was called.
|
|
72
|
+
#
|
|
65
73
|
# @param output_index [Integer] The index of the output item in the response.
|
|
66
74
|
#
|
|
67
75
|
# @param response_id [String] The ID of the response.
|
|
@@ -222,7 +222,7 @@ module OpenAI
|
|
|
222
222
|
#
|
|
223
223
|
# @param path [Array<OpenAI::Models::Responses::ResponseComputerToolCall::Action::Drag::Path>] An array of coordinates representing the path of the drag action. Coordinates wi
|
|
224
224
|
#
|
|
225
|
-
# @param type [Symbol, :drag] Specifies the event type. For a drag action, this property is
|
|
225
|
+
# @param type [Symbol, :drag] Specifies the event type. For a drag action, this property is always set to `dra
|
|
226
226
|
|
|
227
227
|
class Path < OpenAI::Internal::Type::BaseModel
|
|
228
228
|
# @!attribute x
|
|
@@ -304,7 +304,7 @@ module OpenAI
|
|
|
304
304
|
#
|
|
305
305
|
# @param y_ [Integer] The y-coordinate to move to.
|
|
306
306
|
#
|
|
307
|
-
# @param type [Symbol, :move] Specifies the event type. For a move action, this property is
|
|
307
|
+
# @param type [Symbol, :move] Specifies the event type. For a move action, this property is always set to `mov
|
|
308
308
|
end
|
|
309
309
|
|
|
310
310
|
class Screenshot < OpenAI::Internal::Type::BaseModel
|
|
@@ -322,7 +322,7 @@ module OpenAI
|
|
|
322
322
|
#
|
|
323
323
|
# A screenshot action.
|
|
324
324
|
#
|
|
325
|
-
# @param type [Symbol, :screenshot] Specifies the event type. For a screenshot action, this property is
|
|
325
|
+
# @param type [Symbol, :screenshot] Specifies the event type. For a screenshot action, this property is always set t
|
|
326
326
|
end
|
|
327
327
|
|
|
328
328
|
class Scroll < OpenAI::Internal::Type::BaseModel
|
|
@@ -372,7 +372,7 @@ module OpenAI
|
|
|
372
372
|
#
|
|
373
373
|
# @param y_ [Integer] The y-coordinate where the scroll occurred.
|
|
374
374
|
#
|
|
375
|
-
# @param type [Symbol, :scroll] Specifies the event type. For a scroll action, this property is
|
|
375
|
+
# @param type [Symbol, :scroll] Specifies the event type. For a scroll action, this property is always set to `s
|
|
376
376
|
end
|
|
377
377
|
|
|
378
378
|
class Type < OpenAI::Internal::Type::BaseModel
|
|
@@ -398,7 +398,7 @@ module OpenAI
|
|
|
398
398
|
#
|
|
399
399
|
# @param text [String] The text to type.
|
|
400
400
|
#
|
|
401
|
-
# @param type [Symbol, :type] Specifies the event type. For a type action, this property is
|
|
401
|
+
# @param type [Symbol, :type] Specifies the event type. For a type action, this property is always set to `typ
|
|
402
402
|
end
|
|
403
403
|
|
|
404
404
|
class Wait < OpenAI::Internal::Type::BaseModel
|
|
@@ -416,7 +416,7 @@ module OpenAI
|
|
|
416
416
|
#
|
|
417
417
|
# A wait action.
|
|
418
418
|
#
|
|
419
|
-
# @param type [Symbol, :wait] Specifies the event type. For a wait action, this property is
|
|
419
|
+
# @param type [Symbol, :wait] Specifies the event type. For a wait action, this property is always set to `wai
|
|
420
420
|
end
|
|
421
421
|
|
|
422
422
|
# @!method self.variants
|
|
@@ -31,6 +31,13 @@ module OpenAI
|
|
|
31
31
|
required :output,
|
|
32
32
|
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output] }
|
|
33
33
|
|
|
34
|
+
# @!attribute status
|
|
35
|
+
# The status of the shell call output. One of `in_progress`, `completed`, or
|
|
36
|
+
# `incomplete`.
|
|
37
|
+
#
|
|
38
|
+
# @return [Symbol, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Status]
|
|
39
|
+
required :status, enum: -> { OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status }
|
|
40
|
+
|
|
34
41
|
# @!attribute type
|
|
35
42
|
# The type of the shell call output. Always `shell_call_output`.
|
|
36
43
|
#
|
|
@@ -43,7 +50,7 @@ module OpenAI
|
|
|
43
50
|
# @return [String, nil]
|
|
44
51
|
optional :created_by, String
|
|
45
52
|
|
|
46
|
-
# @!method initialize(id:, call_id:, max_output_length:, output:, created_by: nil, type: :shell_call_output)
|
|
53
|
+
# @!method initialize(id:, call_id:, max_output_length:, output:, status:, created_by: nil, type: :shell_call_output)
|
|
47
54
|
# Some parameter documentations has been truncated, see
|
|
48
55
|
# {OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput} for more
|
|
49
56
|
# details.
|
|
@@ -58,6 +65,8 @@ module OpenAI
|
|
|
58
65
|
#
|
|
59
66
|
# @param output [Array<OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output>] An array of shell call output contents
|
|
60
67
|
#
|
|
68
|
+
# @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Status] The status of the shell call output. One of `in_progress`, `completed`, or `inco
|
|
69
|
+
#
|
|
61
70
|
# @param created_by [String] The identifier of the actor that created the item.
|
|
62
71
|
#
|
|
63
72
|
# @param type [Symbol, :shell_call_output] The type of the shell call output. Always `shell_call_output`.
|
|
@@ -156,6 +165,21 @@ module OpenAI
|
|
|
156
165
|
# @return [Array(OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit)]
|
|
157
166
|
end
|
|
158
167
|
end
|
|
168
|
+
|
|
169
|
+
# The status of the shell call output. One of `in_progress`, `completed`, or
|
|
170
|
+
# `incomplete`.
|
|
171
|
+
#
|
|
172
|
+
# @see OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput#status
|
|
173
|
+
module Status
|
|
174
|
+
extend OpenAI::Internal::Type::Enum
|
|
175
|
+
|
|
176
|
+
IN_PROGRESS = :in_progress
|
|
177
|
+
COMPLETED = :completed
|
|
178
|
+
INCOMPLETE = :incomplete
|
|
179
|
+
|
|
180
|
+
# @!method self.values
|
|
181
|
+
# @return [Array<Symbol>]
|
|
182
|
+
end
|
|
159
183
|
end
|
|
160
184
|
end
|
|
161
185
|
end
|
|
@@ -12,7 +12,7 @@ module OpenAI
|
|
|
12
12
|
|
|
13
13
|
# @!attribute action
|
|
14
14
|
# An object describing the specific action taken in this web search call. Includes
|
|
15
|
-
# details on how the model used the web (search, open_page,
|
|
15
|
+
# details on how the model used the web (search, open_page, find_in_page).
|
|
16
16
|
#
|
|
17
17
|
# @return [OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Search, OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::OpenPage, OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Find]
|
|
18
18
|
required :action, union: -> { OpenAI::Responses::ResponseFunctionWebSearch::Action }
|
|
@@ -46,7 +46,7 @@ module OpenAI
|
|
|
46
46
|
# @param type [Symbol, :web_search_call] The type of the web search tool call. Always `web_search_call`.
|
|
47
47
|
|
|
48
48
|
# An object describing the specific action taken in this web search call. Includes
|
|
49
|
-
# details on how the model used the web (search, open_page,
|
|
49
|
+
# details on how the model used the web (search, open_page, find_in_page).
|
|
50
50
|
#
|
|
51
51
|
# @see OpenAI::Models::Responses::ResponseFunctionWebSearch#action
|
|
52
52
|
module Action
|
|
@@ -60,8 +60,8 @@ module OpenAI
|
|
|
60
60
|
# Action type "open_page" - Opens a specific URL from search results.
|
|
61
61
|
variant :open_page, -> { OpenAI::Responses::ResponseFunctionWebSearch::Action::OpenPage }
|
|
62
62
|
|
|
63
|
-
# Action type "
|
|
64
|
-
variant :
|
|
63
|
+
# Action type "find_in_page": Searches for a pattern within a loaded page.
|
|
64
|
+
variant :find_in_page, -> { OpenAI::Responses::ResponseFunctionWebSearch::Action::Find }
|
|
65
65
|
|
|
66
66
|
class Search < OpenAI::Internal::Type::BaseModel
|
|
67
67
|
# @!attribute query
|
|
@@ -140,17 +140,17 @@ module OpenAI
|
|
|
140
140
|
# @!attribute url
|
|
141
141
|
# The URL opened by the model.
|
|
142
142
|
#
|
|
143
|
-
# @return [String]
|
|
144
|
-
|
|
143
|
+
# @return [String, nil]
|
|
144
|
+
optional :url, String, nil?: true
|
|
145
145
|
|
|
146
|
-
# @!method initialize(url
|
|
146
|
+
# @!method initialize(url: nil, type: :open_page)
|
|
147
147
|
# Some parameter documentations has been truncated, see
|
|
148
148
|
# {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::OpenPage} for
|
|
149
149
|
# more details.
|
|
150
150
|
#
|
|
151
151
|
# Action type "open_page" - Opens a specific URL from search results.
|
|
152
152
|
#
|
|
153
|
-
# @param url [String] The URL opened by the model.
|
|
153
|
+
# @param url [String, nil] The URL opened by the model.
|
|
154
154
|
#
|
|
155
155
|
# @param type [Symbol, :open_page] The action type.
|
|
156
156
|
end
|
|
@@ -165,8 +165,8 @@ module OpenAI
|
|
|
165
165
|
# @!attribute type
|
|
166
166
|
# The action type.
|
|
167
167
|
#
|
|
168
|
-
# @return [Symbol, :
|
|
169
|
-
required :type, const: :
|
|
168
|
+
# @return [Symbol, :find_in_page]
|
|
169
|
+
required :type, const: :find_in_page
|
|
170
170
|
|
|
171
171
|
# @!attribute url
|
|
172
172
|
# The URL of the page searched for the pattern.
|
|
@@ -174,18 +174,18 @@ module OpenAI
|
|
|
174
174
|
# @return [String]
|
|
175
175
|
required :url, String
|
|
176
176
|
|
|
177
|
-
# @!method initialize(pattern:, url:, type: :
|
|
177
|
+
# @!method initialize(pattern:, url:, type: :find_in_page)
|
|
178
178
|
# Some parameter documentations has been truncated, see
|
|
179
|
-
# {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Find} for
|
|
180
|
-
# details.
|
|
179
|
+
# {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Find} for
|
|
180
|
+
# more details.
|
|
181
181
|
#
|
|
182
|
-
# Action type "
|
|
182
|
+
# Action type "find_in_page": Searches for a pattern within a loaded page.
|
|
183
183
|
#
|
|
184
184
|
# @param pattern [String] The pattern or text to search for within the page.
|
|
185
185
|
#
|
|
186
186
|
# @param url [String] The URL of the page searched for the pattern.
|
|
187
187
|
#
|
|
188
|
-
# @param type [Symbol, :
|
|
188
|
+
# @param type [Symbol, :find_in_page] The action type.
|
|
189
189
|
end
|
|
190
190
|
|
|
191
191
|
# @!method self.variants
|
|
@@ -746,7 +746,17 @@ module OpenAI
|
|
|
746
746
|
# @return [Integer, nil]
|
|
747
747
|
optional :max_output_length, Integer, nil?: true
|
|
748
748
|
|
|
749
|
-
# @!
|
|
749
|
+
# @!attribute status
|
|
750
|
+
# The status of the shell call output.
|
|
751
|
+
#
|
|
752
|
+
# @return [Symbol, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Status, nil]
|
|
753
|
+
optional :status,
|
|
754
|
+
enum: -> {
|
|
755
|
+
OpenAI::Responses::ResponseInputItem::ShellCallOutput::Status
|
|
756
|
+
},
|
|
757
|
+
nil?: true
|
|
758
|
+
|
|
759
|
+
# @!method initialize(call_id:, output:, id: nil, max_output_length: nil, status: nil, type: :shell_call_output)
|
|
750
760
|
# Some parameter documentations has been truncated, see
|
|
751
761
|
# {OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput} for more
|
|
752
762
|
# details.
|
|
@@ -761,7 +771,23 @@ module OpenAI
|
|
|
761
771
|
#
|
|
762
772
|
# @param max_output_length [Integer, nil] The maximum number of UTF-8 characters captured for this shell call's combined o
|
|
763
773
|
#
|
|
774
|
+
# @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Status, nil] The status of the shell call output.
|
|
775
|
+
#
|
|
764
776
|
# @param type [Symbol, :shell_call_output] The type of the item. Always `shell_call_output`.
|
|
777
|
+
|
|
778
|
+
# The status of the shell call output.
|
|
779
|
+
#
|
|
780
|
+
# @see OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput#status
|
|
781
|
+
module Status
|
|
782
|
+
extend OpenAI::Internal::Type::Enum
|
|
783
|
+
|
|
784
|
+
IN_PROGRESS = :in_progress
|
|
785
|
+
COMPLETED = :completed
|
|
786
|
+
INCOMPLETE = :incomplete
|
|
787
|
+
|
|
788
|
+
# @!method self.values
|
|
789
|
+
# @return [Array<Symbol>]
|
|
790
|
+
end
|
|
765
791
|
end
|
|
766
792
|
|
|
767
793
|
class ApplyPatchCall < OpenAI::Internal::Type::BaseModel
|
|
@@ -446,6 +446,12 @@ module OpenAI
|
|
|
446
446
|
# @return [Symbol, :image_generation]
|
|
447
447
|
required :type, const: :image_generation
|
|
448
448
|
|
|
449
|
+
# @!attribute action
|
|
450
|
+
# Whether to generate a new image or edit an existing image. Default: `auto`.
|
|
451
|
+
#
|
|
452
|
+
# @return [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Action, nil]
|
|
453
|
+
optional :action, enum: -> { OpenAI::Responses::Tool::ImageGeneration::Action }
|
|
454
|
+
|
|
449
455
|
# @!attribute background
|
|
450
456
|
# Background type for the generated image. One of `transparent`, `opaque`, or
|
|
451
457
|
# `auto`. Default: `auto`.
|
|
@@ -519,12 +525,14 @@ module OpenAI
|
|
|
519
525
|
# @return [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Size, nil]
|
|
520
526
|
optional :size, enum: -> { OpenAI::Responses::Tool::ImageGeneration::Size }
|
|
521
527
|
|
|
522
|
-
# @!method initialize(background: nil, input_fidelity: nil, input_image_mask: nil, model: nil, moderation: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, size: nil, type: :image_generation)
|
|
528
|
+
# @!method initialize(action: nil, background: nil, input_fidelity: nil, input_image_mask: nil, model: nil, moderation: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, size: nil, type: :image_generation)
|
|
523
529
|
# Some parameter documentations has been truncated, see
|
|
524
530
|
# {OpenAI::Models::Responses::Tool::ImageGeneration} for more details.
|
|
525
531
|
#
|
|
526
532
|
# A tool that generates images using the GPT image models.
|
|
527
533
|
#
|
|
534
|
+
# @param action [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Action] Whether to generate a new image or edit an existing image. Default: `auto`.
|
|
535
|
+
#
|
|
528
536
|
# @param background [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::Background] Background type for the generated image. One of `transparent`,
|
|
529
537
|
#
|
|
530
538
|
# @param input_fidelity [Symbol, OpenAI::Models::Responses::Tool::ImageGeneration::InputFidelity, nil] Control how much effort the model will exert to match the style and features, es
|
|
@@ -547,6 +555,20 @@ module OpenAI
|
|
|
547
555
|
#
|
|
548
556
|
# @param type [Symbol, :image_generation] The type of the image generation tool. Always `image_generation`.
|
|
549
557
|
|
|
558
|
+
# Whether to generate a new image or edit an existing image. Default: `auto`.
|
|
559
|
+
#
|
|
560
|
+
# @see OpenAI::Models::Responses::Tool::ImageGeneration#action
|
|
561
|
+
module Action
|
|
562
|
+
extend OpenAI::Internal::Type::Enum
|
|
563
|
+
|
|
564
|
+
GENERATE = :generate
|
|
565
|
+
EDIT = :edit
|
|
566
|
+
AUTO = :auto
|
|
567
|
+
|
|
568
|
+
# @!method self.values
|
|
569
|
+
# @return [Array<Symbol>]
|
|
570
|
+
end
|
|
571
|
+
|
|
550
572
|
# Background type for the generated image. One of `transparent`, `opaque`, or
|
|
551
573
|
# `auto`. Default: `auto`.
|
|
552
574
|
#
|
|
@@ -617,6 +639,8 @@ module OpenAI
|
|
|
617
639
|
|
|
618
640
|
variant const: -> { OpenAI::Models::Responses::Tool::ImageGeneration::Model::GPT_IMAGE_1_MINI }
|
|
619
641
|
|
|
642
|
+
variant const: -> { OpenAI::Models::Responses::Tool::ImageGeneration::Model::GPT_IMAGE_1_5 }
|
|
643
|
+
|
|
620
644
|
# @!method self.variants
|
|
621
645
|
# @return [Array(String, Symbol)]
|
|
622
646
|
|
|
@@ -628,6 +652,7 @@ module OpenAI
|
|
|
628
652
|
|
|
629
653
|
GPT_IMAGE_1 = :"gpt-image-1"
|
|
630
654
|
GPT_IMAGE_1_MINI = :"gpt-image-1-mini"
|
|
655
|
+
GPT_IMAGE_1_5 = :"gpt-image-1.5"
|
|
631
656
|
|
|
632
657
|
# @!endgroup
|
|
633
658
|
end
|
|
@@ -4,6 +4,8 @@ module OpenAI
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Beta
|
|
6
6
|
class Assistants
|
|
7
|
+
# @deprecated
|
|
8
|
+
#
|
|
7
9
|
# Some parameter documentations has been truncated, see
|
|
8
10
|
# {OpenAI::Models::Beta::AssistantCreateParams} for more details.
|
|
9
11
|
#
|
|
@@ -49,6 +51,8 @@ module OpenAI
|
|
|
49
51
|
)
|
|
50
52
|
end
|
|
51
53
|
|
|
54
|
+
# @deprecated
|
|
55
|
+
#
|
|
52
56
|
# Retrieves an assistant.
|
|
53
57
|
#
|
|
54
58
|
# @overload retrieve(assistant_id, request_options: {})
|
|
@@ -69,6 +73,8 @@ module OpenAI
|
|
|
69
73
|
)
|
|
70
74
|
end
|
|
71
75
|
|
|
76
|
+
# @deprecated
|
|
77
|
+
#
|
|
72
78
|
# Some parameter documentations has been truncated, see
|
|
73
79
|
# {OpenAI::Models::Beta::AssistantUpdateParams} for more details.
|
|
74
80
|
#
|
|
@@ -116,6 +122,8 @@ module OpenAI
|
|
|
116
122
|
)
|
|
117
123
|
end
|
|
118
124
|
|
|
125
|
+
# @deprecated
|
|
126
|
+
#
|
|
119
127
|
# Some parameter documentations has been truncated, see
|
|
120
128
|
# {OpenAI::Models::Beta::AssistantListParams} for more details.
|
|
121
129
|
#
|
|
@@ -148,6 +156,8 @@ module OpenAI
|
|
|
148
156
|
)
|
|
149
157
|
end
|
|
150
158
|
|
|
159
|
+
# @deprecated
|
|
160
|
+
#
|
|
151
161
|
# Delete an assistant.
|
|
152
162
|
#
|
|
153
163
|
# @overload delete(assistant_id, request_options: {})
|
|
@@ -7,8 +7,8 @@ module OpenAI
|
|
|
7
7
|
# {OpenAI::Models::FileCreateParams} for more details.
|
|
8
8
|
#
|
|
9
9
|
# Upload a file that can be used across various endpoints. Individual files can be
|
|
10
|
-
# up to 512 MB, and
|
|
11
|
-
#
|
|
10
|
+
# up to 512 MB, and each project can store up to 2.5 TB of files in total. There
|
|
11
|
+
# is no organization-wide storage limit.
|
|
12
12
|
#
|
|
13
13
|
# - The Assistants API supports files up to 2 million tokens and of specific file
|
|
14
14
|
# types. See the
|
|
@@ -31,7 +31,7 @@ module OpenAI
|
|
|
31
31
|
#
|
|
32
32
|
# @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The File object (not file name) to be uploaded.
|
|
33
33
|
#
|
|
34
|
-
# @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. One of:
|
|
34
|
+
# @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. One of:
|
|
35
35
|
#
|
|
36
36
|
# @param expires_after [OpenAI::Models::FileCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire
|
|
37
37
|
#
|
data/lib/openai/version.rb
CHANGED