openai 0.121.0 → 0.123.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 +24 -0
- data/README.md +1 -1
- data/lib/openai/models/beta/agent_tool.rb +10 -1
- data/lib/openai/models/beta/agent_tool_param.rb +12 -1
- data/lib/openai/models/beta/beta_response.rb +60 -1
- data/lib/openai/models/beta/persisted_agent_tool.rb +10 -1
- data/lib/openai/models/beta/persisted_agent_tool_param.rb +12 -1
- data/lib/openai/models/responses/response.rb +60 -1
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/beta/agent_tool.rbi +14 -1
- data/rbi/openai/models/beta/agent_tool_param.rbi +15 -0
- data/rbi/openai/models/beta/beta_response.rbi +103 -0
- data/rbi/openai/models/beta/persisted_agent_tool.rbi +14 -1
- data/rbi/openai/models/beta/persisted_agent_tool_param.rbi +15 -0
- data/rbi/openai/models/responses/response.rbi +106 -0
- data/sig/openai/models/beta/agent_tool.rbs +13 -2
- data/sig/openai/models/beta/agent_tool_param.rbs +14 -0
- data/sig/openai/models/beta/beta_response.rbs +67 -0
- data/sig/openai/models/beta/persisted_agent_tool.rbs +13 -2
- data/sig/openai/models/beta/persisted_agent_tool_param.rbs +14 -0
- data/sig/openai/models/responses/response.rbs +67 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c94cbc1845194c892da00630d5143feac80c478c518f1325ba36f510afc6d355
|
|
4
|
+
data.tar.gz: e5f5dd4b686a977b6f6354e5772f0d7cb024f9ae1060c57c9c5cf9da8f9f2b4e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c56d4ef6354d585b97eb289a6275268ab3fdeb77b8afc77c2d53b6dc2e8727edacd801b12f7f6746d426bff8a285fcbd3c75ae821ee49e033f3c84a2d275491
|
|
7
|
+
data.tar.gz: cca0b2b708f90ebdb233cf56b73f073cba6d9c7009e1f33b9eb9fb33a6c1ec961f7bc42238e605955d3c99b5e195921f484c77c53a1479e8ff8a9b769c9afc3f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.123.0](https://github.com/openai/openai-ruby/compare/v0.122.0...v0.123.0) (2026-11-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** expose reasoning input transformations on responses ([#1059](https://github.com/openai/openai-ruby/issues/1059)) ([17a24fd](https://github.com/openai/openai-ruby/commit/17a24fdca4557f9d581b50440f06bb681c8f4de9))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Chores
|
|
12
|
+
|
|
13
|
+
* **deps:** bump ruby/setup-ruby from 1.336.0 to 1.338.0 ([#1048](https://github.com/openai/openai-ruby/issues/1048)) ([ad2c3c8](https://github.com/openai/openai-ruby/commit/ad2c3c8926768441059c7e618c9629c34327f493))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
* simplify review handoff instructions ([#1056](https://github.com/openai/openai-ruby/issues/1056)) ([c0c7a26](https://github.com/openai/openai-ruby/commit/c0c7a26c093b5d9c290598239ec52ae31ca3dc6e))
|
|
19
|
+
|
|
20
|
+
## [0.122.0](https://github.com/openai/openai-ruby/compare/v0.121.0...v0.122.0) (2026-11-10)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **api:** typed async fields for Managed Agents function tools ([#1052](https://github.com/openai/openai-ruby/issues/1052)) ([80ebb2c](https://github.com/openai/openai-ruby/commit/80ebb2cde00f39e19fe962fd2c54380af2068116))
|
|
26
|
+
|
|
3
27
|
## [0.121.0](https://github.com/openai/openai-ruby/compare/v0.120.0...v0.121.0) (2026-11-07)
|
|
4
28
|
|
|
5
29
|
|
data/README.md
CHANGED
|
@@ -58,7 +58,13 @@ module OpenAI
|
|
|
58
58
|
# @return [Symbol, :function]
|
|
59
59
|
required :type, const: :function
|
|
60
60
|
|
|
61
|
-
# @!
|
|
61
|
+
# @!attribute async
|
|
62
|
+
# Whether the agent continues without waiting for the function result.
|
|
63
|
+
#
|
|
64
|
+
# @return [Boolean, nil]
|
|
65
|
+
optional :async, OpenAI::Internal::Type::Boolean
|
|
66
|
+
|
|
67
|
+
# @!method initialize(defer_loading:, description:, name:, parameters:, async: nil, type: :function)
|
|
62
68
|
# A function defined by the application.
|
|
63
69
|
#
|
|
64
70
|
# @param defer_loading [Boolean]
|
|
@@ -73,6 +79,9 @@ module OpenAI
|
|
|
73
79
|
# @param parameters [Hash{Symbol=>Object}]
|
|
74
80
|
# A JSON Schema object describing the function's arguments.
|
|
75
81
|
#
|
|
82
|
+
# @param async [Boolean]
|
|
83
|
+
# Whether the agent continues without waiting for the function result.
|
|
84
|
+
#
|
|
76
85
|
# @param type [Symbol, :function]
|
|
77
86
|
# The type of the object. Always `function`.
|
|
78
87
|
end
|
|
@@ -55,6 +55,13 @@ module OpenAI
|
|
|
55
55
|
# @return [Symbol, :function]
|
|
56
56
|
required :type, const: :function
|
|
57
57
|
|
|
58
|
+
# @!attribute async
|
|
59
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
60
|
+
# `false`.
|
|
61
|
+
#
|
|
62
|
+
# @return [Boolean, nil]
|
|
63
|
+
optional :async, OpenAI::Internal::Type::Boolean
|
|
64
|
+
|
|
58
65
|
# @!attribute defer_loading
|
|
59
66
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
60
67
|
# to `false`.
|
|
@@ -62,7 +69,7 @@ module OpenAI
|
|
|
62
69
|
# @return [Boolean, nil]
|
|
63
70
|
optional :defer_loading, OpenAI::Internal::Type::Boolean
|
|
64
71
|
|
|
65
|
-
# @!method initialize(description:, name:, parameters:, defer_loading: nil, type: :function)
|
|
72
|
+
# @!method initialize(description:, name:, parameters:, async: nil, defer_loading: nil, type: :function)
|
|
66
73
|
# A function defined by the application.
|
|
67
74
|
#
|
|
68
75
|
# @param description [String]
|
|
@@ -74,6 +81,10 @@ module OpenAI
|
|
|
74
81
|
# @param parameters [Hash{Symbol=>Object}]
|
|
75
82
|
# A JSON Schema object describing the function's arguments.
|
|
76
83
|
#
|
|
84
|
+
# @param async [Boolean]
|
|
85
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
86
|
+
# `false`.
|
|
87
|
+
#
|
|
77
88
|
# @param defer_loading [Boolean]
|
|
78
89
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
79
90
|
# to `false`.
|
|
@@ -169,6 +169,15 @@ module OpenAI
|
|
|
169
169
|
# @return [OpenAI::Models::Beta::BetaResponse::Image, nil]
|
|
170
170
|
optional :image, -> { OpenAI::Beta::BetaResponse::Image }
|
|
171
171
|
|
|
172
|
+
# @!attribute input_transformations
|
|
173
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
174
|
+
#
|
|
175
|
+
# @return [Array<OpenAI::Models::Beta::BetaResponse::InputTransformation>, nil]
|
|
176
|
+
optional(
|
|
177
|
+
:input_transformations,
|
|
178
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::BetaResponse::InputTransformation] }
|
|
179
|
+
)
|
|
180
|
+
|
|
172
181
|
# @!attribute max_output_tokens
|
|
173
182
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
174
183
|
# including visible output tokens and
|
|
@@ -380,7 +389,7 @@ module OpenAI
|
|
|
380
389
|
# @return [String, nil]
|
|
381
390
|
optional :user, String
|
|
382
391
|
|
|
383
|
-
# @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
|
|
392
|
+
# @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, input_transformations: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
|
|
384
393
|
# @param id [String]
|
|
385
394
|
# Unique identifier for this Response.
|
|
386
395
|
#
|
|
@@ -483,6 +492,9 @@ module OpenAI
|
|
|
483
492
|
#
|
|
484
493
|
# @param image [OpenAI::Models::Beta::BetaResponse::Image]
|
|
485
494
|
#
|
|
495
|
+
# @param input_transformations [Array<OpenAI::Models::Beta::BetaResponse::InputTransformation>]
|
|
496
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
497
|
+
#
|
|
486
498
|
# @param max_output_tokens [Integer, nil]
|
|
487
499
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
488
500
|
# including visible output tokens and
|
|
@@ -1439,6 +1451,53 @@ module OpenAI
|
|
|
1439
1451
|
end
|
|
1440
1452
|
end
|
|
1441
1453
|
|
|
1454
|
+
class InputTransformation < OpenAI::Internal::Type::BaseModel
|
|
1455
|
+
# @!attribute id
|
|
1456
|
+
# The original reasoning item ID.
|
|
1457
|
+
#
|
|
1458
|
+
# @return [String]
|
|
1459
|
+
required :id, String
|
|
1460
|
+
|
|
1461
|
+
# @!attribute action
|
|
1462
|
+
#
|
|
1463
|
+
# @return [Symbol, :removed]
|
|
1464
|
+
required :action, const: :removed
|
|
1465
|
+
|
|
1466
|
+
# @!attribute reason
|
|
1467
|
+
#
|
|
1468
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaResponse::InputTransformation::Reason]
|
|
1469
|
+
required :reason, enum: -> { OpenAI::Beta::BetaResponse::InputTransformation::Reason }
|
|
1470
|
+
|
|
1471
|
+
# @!attribute type
|
|
1472
|
+
#
|
|
1473
|
+
# @return [Symbol, :reasoning]
|
|
1474
|
+
required :type, const: :reasoning
|
|
1475
|
+
|
|
1476
|
+
# @!method initialize(id:, reason:, action: :removed, type: :reasoning)
|
|
1477
|
+
# @param id [String]
|
|
1478
|
+
# The original reasoning item ID.
|
|
1479
|
+
#
|
|
1480
|
+
# @param reason [Symbol, OpenAI::Models::Beta::BetaResponse::InputTransformation::Reason]
|
|
1481
|
+
#
|
|
1482
|
+
# @param action [Symbol, :removed]
|
|
1483
|
+
#
|
|
1484
|
+
# @param type [Symbol, :reasoning]
|
|
1485
|
+
|
|
1486
|
+
# @see OpenAI::Models::Beta::BetaResponse::InputTransformation#reason
|
|
1487
|
+
module Reason
|
|
1488
|
+
extend OpenAI::Internal::Type::Enum
|
|
1489
|
+
|
|
1490
|
+
ORGANIZATION_MISMATCH = :organization_mismatch
|
|
1491
|
+
END_USER_MISMATCH = :end_user_mismatch
|
|
1492
|
+
MODEL_MISMATCH = :model_mismatch
|
|
1493
|
+
PREFIX_MISMATCH = :prefix_mismatch
|
|
1494
|
+
TURN_BOUNDARY = :turn_boundary
|
|
1495
|
+
|
|
1496
|
+
# @!method self.values
|
|
1497
|
+
# @return [Array<Symbol>]
|
|
1498
|
+
end
|
|
1499
|
+
end
|
|
1500
|
+
|
|
1442
1501
|
# @see OpenAI::Models::Beta::BetaResponse#moderation
|
|
1443
1502
|
class Moderation < OpenAI::Internal::Type::BaseModel
|
|
1444
1503
|
# @!attribute input
|
|
@@ -61,7 +61,13 @@ module OpenAI
|
|
|
61
61
|
# @return [Symbol, :function]
|
|
62
62
|
required :type, const: :function
|
|
63
63
|
|
|
64
|
-
# @!
|
|
64
|
+
# @!attribute async
|
|
65
|
+
# Whether the agent continues without waiting for the function result.
|
|
66
|
+
#
|
|
67
|
+
# @return [Boolean, nil]
|
|
68
|
+
optional :async, OpenAI::Internal::Type::Boolean
|
|
69
|
+
|
|
70
|
+
# @!method initialize(defer_loading:, description:, name:, parameters:, async: nil, type: :function)
|
|
65
71
|
# A function defined by the application.
|
|
66
72
|
#
|
|
67
73
|
# @param defer_loading [Boolean]
|
|
@@ -76,6 +82,9 @@ module OpenAI
|
|
|
76
82
|
# @param parameters [Hash{Symbol=>Object}]
|
|
77
83
|
# A JSON Schema object describing the function's arguments.
|
|
78
84
|
#
|
|
85
|
+
# @param async [Boolean]
|
|
86
|
+
# Whether the agent continues without waiting for the function result.
|
|
87
|
+
#
|
|
79
88
|
# @param type [Symbol, :function]
|
|
80
89
|
# The type of the object. Always `function`.
|
|
81
90
|
end
|
|
@@ -55,6 +55,13 @@ module OpenAI
|
|
|
55
55
|
# @return [Symbol, :function]
|
|
56
56
|
required :type, const: :function
|
|
57
57
|
|
|
58
|
+
# @!attribute async
|
|
59
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
60
|
+
# `false`.
|
|
61
|
+
#
|
|
62
|
+
# @return [Boolean, nil]
|
|
63
|
+
optional :async, OpenAI::Internal::Type::Boolean
|
|
64
|
+
|
|
58
65
|
# @!attribute defer_loading
|
|
59
66
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
60
67
|
# to `false`.
|
|
@@ -62,7 +69,7 @@ module OpenAI
|
|
|
62
69
|
# @return [Boolean, nil]
|
|
63
70
|
optional :defer_loading, OpenAI::Internal::Type::Boolean
|
|
64
71
|
|
|
65
|
-
# @!method initialize(description:, name:, parameters:, defer_loading: nil, type: :function)
|
|
72
|
+
# @!method initialize(description:, name:, parameters:, async: nil, defer_loading: nil, type: :function)
|
|
66
73
|
# A function defined by the application.
|
|
67
74
|
#
|
|
68
75
|
# @param description [String]
|
|
@@ -74,6 +81,10 @@ module OpenAI
|
|
|
74
81
|
# @param parameters [Hash{Symbol=>Object}]
|
|
75
82
|
# A JSON Schema object describing the function's arguments.
|
|
76
83
|
#
|
|
84
|
+
# @param async [Boolean]
|
|
85
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
86
|
+
# `false`.
|
|
87
|
+
#
|
|
77
88
|
# @param defer_loading [Boolean]
|
|
78
89
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
79
90
|
# to `false`.
|
|
@@ -169,6 +169,15 @@ module OpenAI
|
|
|
169
169
|
# @return [OpenAI::Models::Responses::Response::Image, nil]
|
|
170
170
|
optional :image, -> { OpenAI::Responses::Response::Image }
|
|
171
171
|
|
|
172
|
+
# @!attribute input_transformations
|
|
173
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
174
|
+
#
|
|
175
|
+
# @return [Array<OpenAI::Models::Responses::Response::InputTransformation>, nil]
|
|
176
|
+
optional(
|
|
177
|
+
:input_transformations,
|
|
178
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::Response::InputTransformation] }
|
|
179
|
+
)
|
|
180
|
+
|
|
172
181
|
# @!attribute max_output_tokens
|
|
173
182
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
174
183
|
# including visible output tokens and
|
|
@@ -380,7 +389,7 @@ module OpenAI
|
|
|
380
389
|
# @return [String, nil]
|
|
381
390
|
optional :user, String
|
|
382
391
|
|
|
383
|
-
# @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
|
|
392
|
+
# @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, input_transformations: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
|
|
384
393
|
# @param id [String]
|
|
385
394
|
# Unique identifier for this Response.
|
|
386
395
|
#
|
|
@@ -483,6 +492,9 @@ module OpenAI
|
|
|
483
492
|
#
|
|
484
493
|
# @param image [OpenAI::Models::Responses::Response::Image]
|
|
485
494
|
#
|
|
495
|
+
# @param input_transformations [Array<OpenAI::Models::Responses::Response::InputTransformation>]
|
|
496
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
497
|
+
#
|
|
486
498
|
# @param max_output_tokens [Integer, nil]
|
|
487
499
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
488
500
|
# including visible output tokens and
|
|
@@ -820,6 +832,53 @@ module OpenAI
|
|
|
820
832
|
end
|
|
821
833
|
end
|
|
822
834
|
|
|
835
|
+
class InputTransformation < OpenAI::Internal::Type::BaseModel
|
|
836
|
+
# @!attribute id
|
|
837
|
+
# The original reasoning item ID.
|
|
838
|
+
#
|
|
839
|
+
# @return [String]
|
|
840
|
+
required :id, String
|
|
841
|
+
|
|
842
|
+
# @!attribute action
|
|
843
|
+
#
|
|
844
|
+
# @return [Symbol, :removed]
|
|
845
|
+
required :action, const: :removed
|
|
846
|
+
|
|
847
|
+
# @!attribute reason
|
|
848
|
+
#
|
|
849
|
+
# @return [Symbol, OpenAI::Models::Responses::Response::InputTransformation::Reason]
|
|
850
|
+
required :reason, enum: -> { OpenAI::Responses::Response::InputTransformation::Reason }
|
|
851
|
+
|
|
852
|
+
# @!attribute type
|
|
853
|
+
#
|
|
854
|
+
# @return [Symbol, :reasoning]
|
|
855
|
+
required :type, const: :reasoning
|
|
856
|
+
|
|
857
|
+
# @!method initialize(id:, reason:, action: :removed, type: :reasoning)
|
|
858
|
+
# @param id [String]
|
|
859
|
+
# The original reasoning item ID.
|
|
860
|
+
#
|
|
861
|
+
# @param reason [Symbol, OpenAI::Models::Responses::Response::InputTransformation::Reason]
|
|
862
|
+
#
|
|
863
|
+
# @param action [Symbol, :removed]
|
|
864
|
+
#
|
|
865
|
+
# @param type [Symbol, :reasoning]
|
|
866
|
+
|
|
867
|
+
# @see OpenAI::Models::Responses::Response::InputTransformation#reason
|
|
868
|
+
module Reason
|
|
869
|
+
extend OpenAI::Internal::Type::Enum
|
|
870
|
+
|
|
871
|
+
ORGANIZATION_MISMATCH = :organization_mismatch
|
|
872
|
+
END_USER_MISMATCH = :end_user_mismatch
|
|
873
|
+
MODEL_MISMATCH = :model_mismatch
|
|
874
|
+
PREFIX_MISMATCH = :prefix_mismatch
|
|
875
|
+
TURN_BOUNDARY = :turn_boundary
|
|
876
|
+
|
|
877
|
+
# @!method self.values
|
|
878
|
+
# @return [Array<Symbol>]
|
|
879
|
+
end
|
|
880
|
+
end
|
|
881
|
+
|
|
823
882
|
# @see OpenAI::Models::Responses::Response#moderation
|
|
824
883
|
class Moderation < OpenAI::Internal::Type::BaseModel
|
|
825
884
|
# @!attribute input
|
data/lib/openai/version.rb
CHANGED
|
@@ -48,6 +48,13 @@ module OpenAI
|
|
|
48
48
|
sig { returns(Symbol) }
|
|
49
49
|
attr_accessor :type
|
|
50
50
|
|
|
51
|
+
# Whether the agent continues without waiting for the function result.
|
|
52
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
53
|
+
attr_reader :async
|
|
54
|
+
|
|
55
|
+
sig { params(async: T::Boolean).void }
|
|
56
|
+
attr_writer :async
|
|
57
|
+
|
|
51
58
|
# A function defined by the application.
|
|
52
59
|
sig do
|
|
53
60
|
params(
|
|
@@ -60,6 +67,8 @@ module OpenAI
|
|
|
60
67
|
|
|
61
68
|
parameters: T::Hash[Symbol, T.anything],
|
|
62
69
|
|
|
70
|
+
async: T::Boolean,
|
|
71
|
+
|
|
63
72
|
type: Symbol
|
|
64
73
|
)
|
|
65
74
|
.returns(T.attached_class)
|
|
@@ -78,6 +87,9 @@ module OpenAI
|
|
|
78
87
|
# A JSON Schema object describing the function's arguments.
|
|
79
88
|
parameters:,
|
|
80
89
|
|
|
90
|
+
# Whether the agent continues without waiting for the function result.
|
|
91
|
+
async: nil,
|
|
92
|
+
|
|
81
93
|
# The type of the object. Always `function`.
|
|
82
94
|
|
|
83
95
|
type: :function
|
|
@@ -91,7 +103,8 @@ module OpenAI
|
|
|
91
103
|
description: String,
|
|
92
104
|
name: String,
|
|
93
105
|
parameters: T::Hash[Symbol, T.anything],
|
|
94
|
-
type: Symbol
|
|
106
|
+
type: Symbol,
|
|
107
|
+
async: T::Boolean
|
|
95
108
|
}
|
|
96
109
|
)
|
|
97
110
|
end
|
|
@@ -45,6 +45,14 @@ module OpenAI
|
|
|
45
45
|
sig { returns(Symbol) }
|
|
46
46
|
attr_accessor :type
|
|
47
47
|
|
|
48
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
49
|
+
# `false`.
|
|
50
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
51
|
+
attr_reader :async
|
|
52
|
+
|
|
53
|
+
sig { params(async: T::Boolean).void }
|
|
54
|
+
attr_writer :async
|
|
55
|
+
|
|
48
56
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
49
57
|
# to `false`.
|
|
50
58
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -63,6 +71,8 @@ module OpenAI
|
|
|
63
71
|
|
|
64
72
|
parameters: T::Hash[Symbol, T.anything],
|
|
65
73
|
|
|
74
|
+
async: T::Boolean,
|
|
75
|
+
|
|
66
76
|
defer_loading: T::Boolean,
|
|
67
77
|
|
|
68
78
|
type: Symbol
|
|
@@ -80,6 +90,10 @@ module OpenAI
|
|
|
80
90
|
# A JSON Schema object describing the function's arguments.
|
|
81
91
|
parameters:,
|
|
82
92
|
|
|
93
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
94
|
+
# `false`.
|
|
95
|
+
async: nil,
|
|
96
|
+
|
|
83
97
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
84
98
|
# to `false`.
|
|
85
99
|
defer_loading: nil,
|
|
@@ -97,6 +111,7 @@ module OpenAI
|
|
|
97
111
|
name: String,
|
|
98
112
|
parameters: T::Hash[Symbol, T.anything],
|
|
99
113
|
type: Symbol,
|
|
114
|
+
async: T::Boolean,
|
|
100
115
|
defer_loading: T::Boolean
|
|
101
116
|
}
|
|
102
117
|
)
|
|
@@ -155,6 +155,13 @@ module OpenAI
|
|
|
155
155
|
sig { params(image: OpenAI::Beta::BetaResponse::Image::OrHash).void }
|
|
156
156
|
attr_writer :image
|
|
157
157
|
|
|
158
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
159
|
+
sig { returns(T.nilable(T::Array[OpenAI::Beta::BetaResponse::InputTransformation])) }
|
|
160
|
+
attr_reader :input_transformations
|
|
161
|
+
|
|
162
|
+
sig { params(input_transformations: T::Array[OpenAI::Beta::BetaResponse::InputTransformation::OrHash]).void }
|
|
163
|
+
attr_writer :input_transformations
|
|
164
|
+
|
|
158
165
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
159
166
|
# including visible output tokens and
|
|
160
167
|
# [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
@@ -462,6 +469,8 @@ module OpenAI
|
|
|
462
469
|
|
|
463
470
|
image: OpenAI::Beta::BetaResponse::Image::OrHash,
|
|
464
471
|
|
|
472
|
+
input_transformations: T::Array[OpenAI::Beta::BetaResponse::InputTransformation::OrHash],
|
|
473
|
+
|
|
465
474
|
max_output_tokens: T.nilable(Integer),
|
|
466
475
|
|
|
467
476
|
max_tool_calls: T.nilable(Integer),
|
|
@@ -613,6 +622,9 @@ module OpenAI
|
|
|
613
622
|
|
|
614
623
|
image: nil,
|
|
615
624
|
|
|
625
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
626
|
+
input_transformations: nil,
|
|
627
|
+
|
|
616
628
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
617
629
|
# including visible output tokens and
|
|
618
630
|
# [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
@@ -787,6 +799,7 @@ module OpenAI
|
|
|
787
799
|
completed_at: T.nilable(Float),
|
|
788
800
|
conversation: T.nilable(OpenAI::Beta::BetaResponse::Conversation),
|
|
789
801
|
image: OpenAI::Beta::BetaResponse::Image,
|
|
802
|
+
input_transformations: T::Array[OpenAI::Beta::BetaResponse::InputTransformation],
|
|
790
803
|
max_output_tokens: T.nilable(Integer),
|
|
791
804
|
max_tool_calls: T.nilable(Integer),
|
|
792
805
|
moderation: T.nilable(OpenAI::Beta::BetaResponse::Moderation),
|
|
@@ -1274,6 +1287,96 @@ module OpenAI
|
|
|
1274
1287
|
end
|
|
1275
1288
|
end
|
|
1276
1289
|
|
|
1290
|
+
class InputTransformation < OpenAI::Internal::Type::BaseModel
|
|
1291
|
+
OrHash = T.type_alias do
|
|
1292
|
+
T.any(
|
|
1293
|
+
OpenAI::Beta::BetaResponse::InputTransformation,
|
|
1294
|
+
OpenAI::Internal::AnyHash
|
|
1295
|
+
)
|
|
1296
|
+
end
|
|
1297
|
+
|
|
1298
|
+
# The original reasoning item ID.
|
|
1299
|
+
sig { returns(String) }
|
|
1300
|
+
attr_accessor :id
|
|
1301
|
+
|
|
1302
|
+
sig { returns(Symbol) }
|
|
1303
|
+
attr_accessor :action
|
|
1304
|
+
|
|
1305
|
+
sig { returns(OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol) }
|
|
1306
|
+
attr_accessor :reason
|
|
1307
|
+
|
|
1308
|
+
sig { returns(Symbol) }
|
|
1309
|
+
attr_accessor :type
|
|
1310
|
+
|
|
1311
|
+
sig do
|
|
1312
|
+
params(
|
|
1313
|
+
|
|
1314
|
+
id: String,
|
|
1315
|
+
|
|
1316
|
+
reason: OpenAI::Beta::BetaResponse::InputTransformation::Reason::OrSymbol,
|
|
1317
|
+
|
|
1318
|
+
action: Symbol,
|
|
1319
|
+
|
|
1320
|
+
type: Symbol
|
|
1321
|
+
)
|
|
1322
|
+
.returns(T.attached_class)
|
|
1323
|
+
end
|
|
1324
|
+
def self.new(
|
|
1325
|
+
|
|
1326
|
+
# The original reasoning item ID.
|
|
1327
|
+
id:,
|
|
1328
|
+
|
|
1329
|
+
reason:,
|
|
1330
|
+
|
|
1331
|
+
action: :removed,
|
|
1332
|
+
|
|
1333
|
+
type: :reasoning
|
|
1334
|
+
)
|
|
1335
|
+
end
|
|
1336
|
+
|
|
1337
|
+
sig do
|
|
1338
|
+
override.returns(
|
|
1339
|
+
{
|
|
1340
|
+
id: String,
|
|
1341
|
+
action: Symbol,
|
|
1342
|
+
reason: OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol,
|
|
1343
|
+
type: Symbol
|
|
1344
|
+
}
|
|
1345
|
+
)
|
|
1346
|
+
end
|
|
1347
|
+
def to_hash
|
|
1348
|
+
end
|
|
1349
|
+
|
|
1350
|
+
module Reason
|
|
1351
|
+
extend OpenAI::Internal::Type::Enum
|
|
1352
|
+
|
|
1353
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::BetaResponse::InputTransformation::Reason) }
|
|
1354
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1355
|
+
|
|
1356
|
+
ORGANIZATION_MISMATCH = T.let(
|
|
1357
|
+
:organization_mismatch,
|
|
1358
|
+
OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol
|
|
1359
|
+
)
|
|
1360
|
+
END_USER_MISMATCH = T.let(
|
|
1361
|
+
:end_user_mismatch,
|
|
1362
|
+
OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol
|
|
1363
|
+
)
|
|
1364
|
+
MODEL_MISMATCH = T.let(
|
|
1365
|
+
:model_mismatch,
|
|
1366
|
+
OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol
|
|
1367
|
+
)
|
|
1368
|
+
PREFIX_MISMATCH = T.let(
|
|
1369
|
+
:prefix_mismatch,
|
|
1370
|
+
OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol
|
|
1371
|
+
)
|
|
1372
|
+
TURN_BOUNDARY = T.let(:turn_boundary, OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol)
|
|
1373
|
+
|
|
1374
|
+
sig { override.returns(T::Array[OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol]) }
|
|
1375
|
+
def self.values
|
|
1376
|
+
end
|
|
1377
|
+
end
|
|
1378
|
+
end
|
|
1379
|
+
|
|
1277
1380
|
class Moderation < OpenAI::Internal::Type::BaseModel
|
|
1278
1381
|
OrHash = T.type_alias do
|
|
1279
1382
|
T.any(
|
|
@@ -49,6 +49,13 @@ module OpenAI
|
|
|
49
49
|
sig { returns(Symbol) }
|
|
50
50
|
attr_accessor :type
|
|
51
51
|
|
|
52
|
+
# Whether the agent continues without waiting for the function result.
|
|
53
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
54
|
+
attr_reader :async
|
|
55
|
+
|
|
56
|
+
sig { params(async: T::Boolean).void }
|
|
57
|
+
attr_writer :async
|
|
58
|
+
|
|
52
59
|
# A function defined by the application.
|
|
53
60
|
sig do
|
|
54
61
|
params(
|
|
@@ -61,6 +68,8 @@ module OpenAI
|
|
|
61
68
|
|
|
62
69
|
parameters: T::Hash[Symbol, T.anything],
|
|
63
70
|
|
|
71
|
+
async: T::Boolean,
|
|
72
|
+
|
|
64
73
|
type: Symbol
|
|
65
74
|
)
|
|
66
75
|
.returns(T.attached_class)
|
|
@@ -79,6 +88,9 @@ module OpenAI
|
|
|
79
88
|
# A JSON Schema object describing the function's arguments.
|
|
80
89
|
parameters:,
|
|
81
90
|
|
|
91
|
+
# Whether the agent continues without waiting for the function result.
|
|
92
|
+
async: nil,
|
|
93
|
+
|
|
82
94
|
# The type of the object. Always `function`.
|
|
83
95
|
|
|
84
96
|
type: :function
|
|
@@ -92,7 +104,8 @@ module OpenAI
|
|
|
92
104
|
description: String,
|
|
93
105
|
name: String,
|
|
94
106
|
parameters: T::Hash[Symbol, T.anything],
|
|
95
|
-
type: Symbol
|
|
107
|
+
type: Symbol,
|
|
108
|
+
async: T::Boolean
|
|
96
109
|
}
|
|
97
110
|
)
|
|
98
111
|
end
|
|
@@ -45,6 +45,14 @@ module OpenAI
|
|
|
45
45
|
sig { returns(Symbol) }
|
|
46
46
|
attr_accessor :type
|
|
47
47
|
|
|
48
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
49
|
+
# `false`.
|
|
50
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
51
|
+
attr_reader :async
|
|
52
|
+
|
|
53
|
+
sig { params(async: T::Boolean).void }
|
|
54
|
+
attr_writer :async
|
|
55
|
+
|
|
48
56
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
49
57
|
# to `false`.
|
|
50
58
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -63,6 +71,8 @@ module OpenAI
|
|
|
63
71
|
|
|
64
72
|
parameters: T::Hash[Symbol, T.anything],
|
|
65
73
|
|
|
74
|
+
async: T::Boolean,
|
|
75
|
+
|
|
66
76
|
defer_loading: T::Boolean,
|
|
67
77
|
|
|
68
78
|
type: Symbol
|
|
@@ -80,6 +90,10 @@ module OpenAI
|
|
|
80
90
|
# A JSON Schema object describing the function's arguments.
|
|
81
91
|
parameters:,
|
|
82
92
|
|
|
93
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
94
|
+
# `false`.
|
|
95
|
+
async: nil,
|
|
96
|
+
|
|
83
97
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
84
98
|
# to `false`.
|
|
85
99
|
defer_loading: nil,
|
|
@@ -97,6 +111,7 @@ module OpenAI
|
|
|
97
111
|
name: String,
|
|
98
112
|
parameters: T::Hash[Symbol, T.anything],
|
|
99
113
|
type: Symbol,
|
|
114
|
+
async: T::Boolean,
|
|
100
115
|
defer_loading: T::Boolean
|
|
101
116
|
}
|
|
102
117
|
)
|
|
@@ -153,6 +153,13 @@ module OpenAI
|
|
|
153
153
|
sig { params(image: OpenAI::Responses::Response::Image::OrHash).void }
|
|
154
154
|
attr_writer :image
|
|
155
155
|
|
|
156
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
157
|
+
sig { returns(T.nilable(T::Array[OpenAI::Responses::Response::InputTransformation])) }
|
|
158
|
+
attr_reader :input_transformations
|
|
159
|
+
|
|
160
|
+
sig { params(input_transformations: T::Array[OpenAI::Responses::Response::InputTransformation::OrHash]).void }
|
|
161
|
+
attr_writer :input_transformations
|
|
162
|
+
|
|
156
163
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
157
164
|
# including visible output tokens and
|
|
158
165
|
# [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
@@ -457,6 +464,8 @@ module OpenAI
|
|
|
457
464
|
|
|
458
465
|
image: OpenAI::Responses::Response::Image::OrHash,
|
|
459
466
|
|
|
467
|
+
input_transformations: T::Array[OpenAI::Responses::Response::InputTransformation::OrHash],
|
|
468
|
+
|
|
460
469
|
max_output_tokens: T.nilable(Integer),
|
|
461
470
|
|
|
462
471
|
max_tool_calls: T.nilable(Integer),
|
|
@@ -608,6 +617,9 @@ module OpenAI
|
|
|
608
617
|
|
|
609
618
|
image: nil,
|
|
610
619
|
|
|
620
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
621
|
+
input_transformations: nil,
|
|
622
|
+
|
|
611
623
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
612
624
|
# including visible output tokens and
|
|
613
625
|
# [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
@@ -782,6 +794,7 @@ module OpenAI
|
|
|
782
794
|
completed_at: T.nilable(Float),
|
|
783
795
|
conversation: T.nilable(OpenAI::Responses::Response::Conversation),
|
|
784
796
|
image: OpenAI::Responses::Response::Image,
|
|
797
|
+
input_transformations: T::Array[OpenAI::Responses::Response::InputTransformation],
|
|
785
798
|
max_output_tokens: T.nilable(Integer),
|
|
786
799
|
max_tool_calls: T.nilable(Integer),
|
|
787
800
|
moderation: T.nilable(OpenAI::Responses::Response::Moderation),
|
|
@@ -1102,6 +1115,99 @@ module OpenAI
|
|
|
1102
1115
|
end
|
|
1103
1116
|
end
|
|
1104
1117
|
|
|
1118
|
+
class InputTransformation < OpenAI::Internal::Type::BaseModel
|
|
1119
|
+
OrHash = T.type_alias do
|
|
1120
|
+
T.any(
|
|
1121
|
+
OpenAI::Responses::Response::InputTransformation,
|
|
1122
|
+
OpenAI::Internal::AnyHash
|
|
1123
|
+
)
|
|
1124
|
+
end
|
|
1125
|
+
|
|
1126
|
+
# The original reasoning item ID.
|
|
1127
|
+
sig { returns(String) }
|
|
1128
|
+
attr_accessor :id
|
|
1129
|
+
|
|
1130
|
+
sig { returns(Symbol) }
|
|
1131
|
+
attr_accessor :action
|
|
1132
|
+
|
|
1133
|
+
sig { returns(OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol) }
|
|
1134
|
+
attr_accessor :reason
|
|
1135
|
+
|
|
1136
|
+
sig { returns(Symbol) }
|
|
1137
|
+
attr_accessor :type
|
|
1138
|
+
|
|
1139
|
+
sig do
|
|
1140
|
+
params(
|
|
1141
|
+
|
|
1142
|
+
id: String,
|
|
1143
|
+
|
|
1144
|
+
reason: OpenAI::Responses::Response::InputTransformation::Reason::OrSymbol,
|
|
1145
|
+
|
|
1146
|
+
action: Symbol,
|
|
1147
|
+
|
|
1148
|
+
type: Symbol
|
|
1149
|
+
)
|
|
1150
|
+
.returns(T.attached_class)
|
|
1151
|
+
end
|
|
1152
|
+
def self.new(
|
|
1153
|
+
|
|
1154
|
+
# The original reasoning item ID.
|
|
1155
|
+
id:,
|
|
1156
|
+
|
|
1157
|
+
reason:,
|
|
1158
|
+
|
|
1159
|
+
action: :removed,
|
|
1160
|
+
|
|
1161
|
+
type: :reasoning
|
|
1162
|
+
)
|
|
1163
|
+
end
|
|
1164
|
+
|
|
1165
|
+
sig do
|
|
1166
|
+
override.returns(
|
|
1167
|
+
{
|
|
1168
|
+
id: String,
|
|
1169
|
+
action: Symbol,
|
|
1170
|
+
reason: OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol,
|
|
1171
|
+
type: Symbol
|
|
1172
|
+
}
|
|
1173
|
+
)
|
|
1174
|
+
end
|
|
1175
|
+
def to_hash
|
|
1176
|
+
end
|
|
1177
|
+
|
|
1178
|
+
module Reason
|
|
1179
|
+
extend OpenAI::Internal::Type::Enum
|
|
1180
|
+
|
|
1181
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Responses::Response::InputTransformation::Reason) }
|
|
1182
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1183
|
+
|
|
1184
|
+
ORGANIZATION_MISMATCH = T.let(
|
|
1185
|
+
:organization_mismatch,
|
|
1186
|
+
OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
|
|
1187
|
+
)
|
|
1188
|
+
END_USER_MISMATCH = T.let(
|
|
1189
|
+
:end_user_mismatch,
|
|
1190
|
+
OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
|
|
1191
|
+
)
|
|
1192
|
+
MODEL_MISMATCH = T.let(
|
|
1193
|
+
:model_mismatch,
|
|
1194
|
+
OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
|
|
1195
|
+
)
|
|
1196
|
+
PREFIX_MISMATCH = T.let(
|
|
1197
|
+
:prefix_mismatch,
|
|
1198
|
+
OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
|
|
1199
|
+
)
|
|
1200
|
+
TURN_BOUNDARY = T.let(
|
|
1201
|
+
:turn_boundary,
|
|
1202
|
+
OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
|
|
1203
|
+
)
|
|
1204
|
+
|
|
1205
|
+
sig { override.returns(T::Array[OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol]) }
|
|
1206
|
+
def self.values
|
|
1207
|
+
end
|
|
1208
|
+
end
|
|
1209
|
+
end
|
|
1210
|
+
|
|
1105
1211
|
class Moderation < OpenAI::Internal::Type::BaseModel
|
|
1106
1212
|
OrHash = T.type_alias do
|
|
1107
1213
|
T.any(
|
|
@@ -18,7 +18,8 @@ module OpenAI
|
|
|
18
18
|
description: String,
|
|
19
19
|
name: String,
|
|
20
20
|
parameters: ::Hash[Symbol, top],
|
|
21
|
-
?type: :function
|
|
21
|
+
?type: :function,
|
|
22
|
+
?async: bool
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
class Function < OpenAI::Internal::Type::BaseModel
|
|
@@ -37,6 +38,12 @@ module OpenAI
|
|
|
37
38
|
# The type of the object. Always `function`.
|
|
38
39
|
attr_accessor type: :function
|
|
39
40
|
|
|
41
|
+
# Whether the agent continues without waiting for the function result.
|
|
42
|
+
attr_reader async: bool?
|
|
43
|
+
|
|
44
|
+
# Whether the agent continues without waiting for the function result.
|
|
45
|
+
def async=: (bool) -> bool
|
|
46
|
+
|
|
40
47
|
# @param defer_loading
|
|
41
48
|
# Whether the function is deferred and discovered through tool search.
|
|
42
49
|
# @param description
|
|
@@ -45,6 +52,8 @@ module OpenAI
|
|
|
45
52
|
# The name of the function.
|
|
46
53
|
# @param parameters
|
|
47
54
|
# A JSON Schema object describing the function's arguments.
|
|
55
|
+
# @param async
|
|
56
|
+
# Whether the agent continues without waiting for the function result.
|
|
48
57
|
# @param type
|
|
49
58
|
# The type of the object. Always `function`.
|
|
50
59
|
def initialize: (
|
|
@@ -52,6 +61,7 @@ module OpenAI
|
|
|
52
61
|
description: String,
|
|
53
62
|
name: String,
|
|
54
63
|
parameters: ::Hash[Symbol, top],
|
|
64
|
+
?async: bool,
|
|
55
65
|
?type: :function
|
|
56
66
|
) -> void
|
|
57
67
|
|
|
@@ -60,7 +70,8 @@ module OpenAI
|
|
|
60
70
|
description: String,
|
|
61
71
|
name: String,
|
|
62
72
|
parameters: ::Hash[Symbol, top],
|
|
63
|
-
?type: :function
|
|
73
|
+
?type: :function,
|
|
74
|
+
?async: bool
|
|
64
75
|
}
|
|
65
76
|
end
|
|
66
77
|
|
|
@@ -19,6 +19,7 @@ module OpenAI
|
|
|
19
19
|
name: String,
|
|
20
20
|
parameters: ::Hash[Symbol, top],
|
|
21
21
|
?type: :function,
|
|
22
|
+
?async: bool,
|
|
22
23
|
?defer_loading: bool
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -35,6 +36,14 @@ module OpenAI
|
|
|
35
36
|
# The type of the object. Always `function`.
|
|
36
37
|
attr_accessor type: :function
|
|
37
38
|
|
|
39
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
40
|
+
# `false`.
|
|
41
|
+
attr_reader async: bool?
|
|
42
|
+
|
|
43
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
44
|
+
# `false`.
|
|
45
|
+
def async=: (bool) -> bool
|
|
46
|
+
|
|
38
47
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
39
48
|
# to `false`.
|
|
40
49
|
attr_reader defer_loading: bool?
|
|
@@ -49,6 +58,9 @@ module OpenAI
|
|
|
49
58
|
# The name of the function.
|
|
50
59
|
# @param parameters
|
|
51
60
|
# A JSON Schema object describing the function's arguments.
|
|
61
|
+
# @param async
|
|
62
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
63
|
+
# `false`.
|
|
52
64
|
# @param defer_loading
|
|
53
65
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
54
66
|
# to `false`.
|
|
@@ -58,6 +70,7 @@ module OpenAI
|
|
|
58
70
|
description: String,
|
|
59
71
|
name: String,
|
|
60
72
|
parameters: ::Hash[Symbol, top],
|
|
73
|
+
?async: bool,
|
|
61
74
|
?defer_loading: bool,
|
|
62
75
|
?type: :function
|
|
63
76
|
) -> void
|
|
@@ -67,6 +80,7 @@ module OpenAI
|
|
|
67
80
|
name: String,
|
|
68
81
|
parameters: ::Hash[Symbol, top],
|
|
69
82
|
?type: :function,
|
|
83
|
+
?async: bool,
|
|
70
84
|
?defer_loading: bool
|
|
71
85
|
}
|
|
72
86
|
end
|
|
@@ -24,6 +24,7 @@ module OpenAI
|
|
|
24
24
|
?completed_at: Float?,
|
|
25
25
|
?conversation: OpenAI::Beta::BetaResponse::Conversation?,
|
|
26
26
|
?image: OpenAI::Beta::BetaResponse::Image,
|
|
27
|
+
?input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation],
|
|
27
28
|
?max_output_tokens: Integer?,
|
|
28
29
|
?max_tool_calls: Integer?,
|
|
29
30
|
?moderation: OpenAI::Beta::BetaResponse::Moderation?,
|
|
@@ -155,6 +156,14 @@ module OpenAI
|
|
|
155
156
|
OpenAI::Beta::BetaResponse::Image
|
|
156
157
|
) -> OpenAI::Beta::BetaResponse::Image
|
|
157
158
|
|
|
159
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
160
|
+
attr_reader input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation]?
|
|
161
|
+
|
|
162
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
163
|
+
def input_transformations=: (
|
|
164
|
+
::Array[OpenAI::Beta::BetaResponse::InputTransformation]
|
|
165
|
+
) -> ::Array[OpenAI::Beta::BetaResponse::InputTransformation]
|
|
166
|
+
|
|
158
167
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
159
168
|
# including visible output tokens and
|
|
160
169
|
# [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
@@ -438,6 +447,8 @@ module OpenAI
|
|
|
438
447
|
# @param conversation
|
|
439
448
|
# The conversation that this response belonged to. Input items and output items
|
|
440
449
|
# from this response were automatically added to this conversation.
|
|
450
|
+
# @param input_transformations
|
|
451
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
441
452
|
# @param max_output_tokens
|
|
442
453
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
443
454
|
# including visible output tokens and
|
|
@@ -586,6 +597,7 @@ module OpenAI
|
|
|
586
597
|
?completed_at: Float?,
|
|
587
598
|
?conversation: OpenAI::Beta::BetaResponse::Conversation?,
|
|
588
599
|
?image: OpenAI::Beta::BetaResponse::Image,
|
|
600
|
+
?input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation],
|
|
589
601
|
?max_output_tokens: Integer?,
|
|
590
602
|
?max_tool_calls: Integer?,
|
|
591
603
|
?moderation: OpenAI::Beta::BetaResponse::Moderation?,
|
|
@@ -628,6 +640,7 @@ module OpenAI
|
|
|
628
640
|
?completed_at: Float?,
|
|
629
641
|
?conversation: OpenAI::Beta::BetaResponse::Conversation?,
|
|
630
642
|
?image: OpenAI::Beta::BetaResponse::Image,
|
|
643
|
+
?input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation],
|
|
631
644
|
?max_output_tokens: Integer?,
|
|
632
645
|
?max_tool_calls: Integer?,
|
|
633
646
|
?moderation: OpenAI::Beta::BetaResponse::Moderation?,
|
|
@@ -1042,6 +1055,60 @@ module OpenAI
|
|
|
1042
1055
|
end
|
|
1043
1056
|
end
|
|
1044
1057
|
|
|
1058
|
+
type input_transformation =
|
|
1059
|
+
{
|
|
1060
|
+
id: String,
|
|
1061
|
+
?action: :removed,
|
|
1062
|
+
reason: OpenAI::Models::Beta::BetaResponse::InputTransformation::reason,
|
|
1063
|
+
?type: :reasoning
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
class InputTransformation < OpenAI::Internal::Type::BaseModel
|
|
1067
|
+
# The original reasoning item ID.
|
|
1068
|
+
attr_accessor id: String
|
|
1069
|
+
|
|
1070
|
+
attr_accessor action: :removed
|
|
1071
|
+
|
|
1072
|
+
attr_accessor reason: OpenAI::Models::Beta::BetaResponse::InputTransformation::reason
|
|
1073
|
+
|
|
1074
|
+
attr_accessor type: :reasoning
|
|
1075
|
+
|
|
1076
|
+
# @param id
|
|
1077
|
+
# The original reasoning item ID.
|
|
1078
|
+
def initialize: (
|
|
1079
|
+
id: String,
|
|
1080
|
+
reason: OpenAI::Models::Beta::BetaResponse::InputTransformation::reason,
|
|
1081
|
+
?action: :removed,
|
|
1082
|
+
?type: :reasoning
|
|
1083
|
+
) -> void
|
|
1084
|
+
|
|
1085
|
+
def to_hash: -> {
|
|
1086
|
+
id: String,
|
|
1087
|
+
?action: :removed,
|
|
1088
|
+
reason: OpenAI::Models::Beta::BetaResponse::InputTransformation::reason,
|
|
1089
|
+
?type: :reasoning
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
type reason =
|
|
1093
|
+
:organization_mismatch
|
|
1094
|
+
| :end_user_mismatch
|
|
1095
|
+
| :model_mismatch
|
|
1096
|
+
| :prefix_mismatch
|
|
1097
|
+
| :turn_boundary
|
|
1098
|
+
|
|
1099
|
+
module Reason
|
|
1100
|
+
extend OpenAI::Internal::Type::Enum
|
|
1101
|
+
|
|
1102
|
+
ORGANIZATION_MISMATCH: :organization_mismatch
|
|
1103
|
+
END_USER_MISMATCH: :end_user_mismatch
|
|
1104
|
+
MODEL_MISMATCH: :model_mismatch
|
|
1105
|
+
PREFIX_MISMATCH: :prefix_mismatch
|
|
1106
|
+
TURN_BOUNDARY: :turn_boundary
|
|
1107
|
+
|
|
1108
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponse::InputTransformation::reason]
|
|
1109
|
+
end
|
|
1110
|
+
end
|
|
1111
|
+
|
|
1045
1112
|
type moderation =
|
|
1046
1113
|
{
|
|
1047
1114
|
input: OpenAI::Models::Beta::BetaResponse::Moderation::input,
|
|
@@ -19,7 +19,8 @@ module OpenAI
|
|
|
19
19
|
description: String,
|
|
20
20
|
name: String,
|
|
21
21
|
parameters: ::Hash[Symbol, top],
|
|
22
|
-
?type: :function
|
|
22
|
+
?type: :function,
|
|
23
|
+
?async: bool
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
class Function < OpenAI::Internal::Type::BaseModel
|
|
@@ -38,6 +39,12 @@ module OpenAI
|
|
|
38
39
|
# The type of the object. Always `function`.
|
|
39
40
|
attr_accessor type: :function
|
|
40
41
|
|
|
42
|
+
# Whether the agent continues without waiting for the function result.
|
|
43
|
+
attr_reader async: bool?
|
|
44
|
+
|
|
45
|
+
# Whether the agent continues without waiting for the function result.
|
|
46
|
+
def async=: (bool) -> bool
|
|
47
|
+
|
|
41
48
|
# @param defer_loading
|
|
42
49
|
# Whether the function is deferred and discovered through tool search.
|
|
43
50
|
# @param description
|
|
@@ -46,6 +53,8 @@ module OpenAI
|
|
|
46
53
|
# The name of the function.
|
|
47
54
|
# @param parameters
|
|
48
55
|
# A JSON Schema object describing the function's arguments.
|
|
56
|
+
# @param async
|
|
57
|
+
# Whether the agent continues without waiting for the function result.
|
|
49
58
|
# @param type
|
|
50
59
|
# The type of the object. Always `function`.
|
|
51
60
|
def initialize: (
|
|
@@ -53,6 +62,7 @@ module OpenAI
|
|
|
53
62
|
description: String,
|
|
54
63
|
name: String,
|
|
55
64
|
parameters: ::Hash[Symbol, top],
|
|
65
|
+
?async: bool,
|
|
56
66
|
?type: :function
|
|
57
67
|
) -> void
|
|
58
68
|
|
|
@@ -61,7 +71,8 @@ module OpenAI
|
|
|
61
71
|
description: String,
|
|
62
72
|
name: String,
|
|
63
73
|
parameters: ::Hash[Symbol, top],
|
|
64
|
-
?type: :function
|
|
74
|
+
?type: :function,
|
|
75
|
+
?async: bool
|
|
65
76
|
}
|
|
66
77
|
end
|
|
67
78
|
|
|
@@ -19,6 +19,7 @@ module OpenAI
|
|
|
19
19
|
name: String,
|
|
20
20
|
parameters: ::Hash[Symbol, top],
|
|
21
21
|
?type: :function,
|
|
22
|
+
?async: bool,
|
|
22
23
|
?defer_loading: bool
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -35,6 +36,14 @@ module OpenAI
|
|
|
35
36
|
# The type of the object. Always `function`.
|
|
36
37
|
attr_accessor type: :function
|
|
37
38
|
|
|
39
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
40
|
+
# `false`.
|
|
41
|
+
attr_reader async: bool?
|
|
42
|
+
|
|
43
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
44
|
+
# `false`.
|
|
45
|
+
def async=: (bool) -> bool
|
|
46
|
+
|
|
38
47
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
39
48
|
# to `false`.
|
|
40
49
|
attr_reader defer_loading: bool?
|
|
@@ -49,6 +58,9 @@ module OpenAI
|
|
|
49
58
|
# The name of the function.
|
|
50
59
|
# @param parameters
|
|
51
60
|
# A JSON Schema object describing the function's arguments.
|
|
61
|
+
# @param async
|
|
62
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
63
|
+
# `false`.
|
|
52
64
|
# @param defer_loading
|
|
53
65
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
54
66
|
# to `false`.
|
|
@@ -58,6 +70,7 @@ module OpenAI
|
|
|
58
70
|
description: String,
|
|
59
71
|
name: String,
|
|
60
72
|
parameters: ::Hash[Symbol, top],
|
|
73
|
+
?async: bool,
|
|
61
74
|
?defer_loading: bool,
|
|
62
75
|
?type: :function
|
|
63
76
|
) -> void
|
|
@@ -67,6 +80,7 @@ module OpenAI
|
|
|
67
80
|
name: String,
|
|
68
81
|
parameters: ::Hash[Symbol, top],
|
|
69
82
|
?type: :function,
|
|
83
|
+
?async: bool,
|
|
70
84
|
?defer_loading: bool
|
|
71
85
|
}
|
|
72
86
|
end
|
|
@@ -22,6 +22,7 @@ module OpenAI
|
|
|
22
22
|
?completed_at: Float?,
|
|
23
23
|
?conversation: OpenAI::Responses::Response::Conversation?,
|
|
24
24
|
?image: OpenAI::Responses::Response::Image,
|
|
25
|
+
?input_transformations: ::Array[OpenAI::Responses::Response::InputTransformation],
|
|
25
26
|
?max_output_tokens: Integer?,
|
|
26
27
|
?max_tool_calls: Integer?,
|
|
27
28
|
?moderation: OpenAI::Responses::Response::Moderation?,
|
|
@@ -153,6 +154,14 @@ module OpenAI
|
|
|
153
154
|
OpenAI::Responses::Response::Image
|
|
154
155
|
) -> OpenAI::Responses::Response::Image
|
|
155
156
|
|
|
157
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
158
|
+
attr_reader input_transformations: ::Array[OpenAI::Responses::Response::InputTransformation]?
|
|
159
|
+
|
|
160
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
161
|
+
def input_transformations=: (
|
|
162
|
+
::Array[OpenAI::Responses::Response::InputTransformation]
|
|
163
|
+
) -> ::Array[OpenAI::Responses::Response::InputTransformation]
|
|
164
|
+
|
|
156
165
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
157
166
|
# including visible output tokens and
|
|
158
167
|
# [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
@@ -436,6 +445,8 @@ module OpenAI
|
|
|
436
445
|
# @param conversation
|
|
437
446
|
# The conversation that this response belonged to. Input items and output items
|
|
438
447
|
# from this response were automatically added to this conversation.
|
|
448
|
+
# @param input_transformations
|
|
449
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
439
450
|
# @param max_output_tokens
|
|
440
451
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
441
452
|
# including visible output tokens and
|
|
@@ -584,6 +595,7 @@ module OpenAI
|
|
|
584
595
|
?completed_at: Float?,
|
|
585
596
|
?conversation: OpenAI::Responses::Response::Conversation?,
|
|
586
597
|
?image: OpenAI::Responses::Response::Image,
|
|
598
|
+
?input_transformations: ::Array[OpenAI::Responses::Response::InputTransformation],
|
|
587
599
|
?max_output_tokens: Integer?,
|
|
588
600
|
?max_tool_calls: Integer?,
|
|
589
601
|
?moderation: OpenAI::Responses::Response::Moderation?,
|
|
@@ -626,6 +638,7 @@ module OpenAI
|
|
|
626
638
|
?completed_at: Float?,
|
|
627
639
|
?conversation: OpenAI::Responses::Response::Conversation?,
|
|
628
640
|
?image: OpenAI::Responses::Response::Image,
|
|
641
|
+
?input_transformations: ::Array[OpenAI::Responses::Response::InputTransformation],
|
|
629
642
|
?max_output_tokens: Integer?,
|
|
630
643
|
?max_tool_calls: Integer?,
|
|
631
644
|
?moderation: OpenAI::Responses::Response::Moderation?,
|
|
@@ -808,6 +821,60 @@ module OpenAI
|
|
|
808
821
|
end
|
|
809
822
|
end
|
|
810
823
|
|
|
824
|
+
type input_transformation =
|
|
825
|
+
{
|
|
826
|
+
id: String,
|
|
827
|
+
?action: :removed,
|
|
828
|
+
reason: OpenAI::Models::Responses::Response::InputTransformation::reason,
|
|
829
|
+
?type: :reasoning
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
class InputTransformation < OpenAI::Internal::Type::BaseModel
|
|
833
|
+
# The original reasoning item ID.
|
|
834
|
+
attr_accessor id: String
|
|
835
|
+
|
|
836
|
+
attr_accessor action: :removed
|
|
837
|
+
|
|
838
|
+
attr_accessor reason: OpenAI::Models::Responses::Response::InputTransformation::reason
|
|
839
|
+
|
|
840
|
+
attr_accessor type: :reasoning
|
|
841
|
+
|
|
842
|
+
# @param id
|
|
843
|
+
# The original reasoning item ID.
|
|
844
|
+
def initialize: (
|
|
845
|
+
id: String,
|
|
846
|
+
reason: OpenAI::Models::Responses::Response::InputTransformation::reason,
|
|
847
|
+
?action: :removed,
|
|
848
|
+
?type: :reasoning
|
|
849
|
+
) -> void
|
|
850
|
+
|
|
851
|
+
def to_hash: -> {
|
|
852
|
+
id: String,
|
|
853
|
+
?action: :removed,
|
|
854
|
+
reason: OpenAI::Models::Responses::Response::InputTransformation::reason,
|
|
855
|
+
?type: :reasoning
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
type reason =
|
|
859
|
+
:organization_mismatch
|
|
860
|
+
| :end_user_mismatch
|
|
861
|
+
| :model_mismatch
|
|
862
|
+
| :prefix_mismatch
|
|
863
|
+
| :turn_boundary
|
|
864
|
+
|
|
865
|
+
module Reason
|
|
866
|
+
extend OpenAI::Internal::Type::Enum
|
|
867
|
+
|
|
868
|
+
ORGANIZATION_MISMATCH: :organization_mismatch
|
|
869
|
+
END_USER_MISMATCH: :end_user_mismatch
|
|
870
|
+
MODEL_MISMATCH: :model_mismatch
|
|
871
|
+
PREFIX_MISMATCH: :prefix_mismatch
|
|
872
|
+
TURN_BOUNDARY: :turn_boundary
|
|
873
|
+
|
|
874
|
+
def self?.values: -> ::Array[OpenAI::Models::Responses::Response::InputTransformation::reason]
|
|
875
|
+
end
|
|
876
|
+
end
|
|
877
|
+
|
|
811
878
|
type moderation =
|
|
812
879
|
{
|
|
813
880
|
input: OpenAI::Models::Responses::Response::Moderation::input,
|