openai 0.24.0 → 0.25.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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/conversations/conversation_create_params.rb +1 -1
  5. data/lib/openai/models/conversations/conversation_update_params.rb +7 -6
  6. data/lib/openai/models/conversations/message.rb +27 -3
  7. data/lib/openai/models/conversations/summary_text_content.rb +5 -2
  8. data/lib/openai/models/realtime/conversation_item.rb +1 -1
  9. data/lib/openai/models/realtime/realtime_mcp_tool_call.rb +5 -5
  10. data/lib/openai/models/responses/response_content.rb +25 -1
  11. data/lib/openai/models/responses/response_content_part_added_event.rb +27 -3
  12. data/lib/openai/models/responses/response_content_part_done_event.rb +27 -3
  13. data/lib/openai/models/responses/response_reasoning_item.rb +6 -8
  14. data/lib/openai/resources/conversations.rb +5 -5
  15. data/lib/openai/version.rb +1 -1
  16. data/rbi/openai/models/conversations/conversation_update_params.rbi +11 -9
  17. data/rbi/openai/models/conversations/message.rbi +34 -0
  18. data/rbi/openai/models/conversations/summary_text_content.rbi +8 -1
  19. data/rbi/openai/models/realtime/realtime_mcp_tool_call.rbi +3 -3
  20. data/rbi/openai/models/responses/response_content.rbi +34 -1
  21. data/rbi/openai/models/responses/response_content_part_added_event.rbi +36 -2
  22. data/rbi/openai/models/responses/response_content_part_done_event.rbi +36 -2
  23. data/rbi/openai/models/responses/response_reasoning_item.rbi +6 -4
  24. data/rbi/openai/resources/conversations.rbi +8 -7
  25. data/sig/openai/models/conversations/conversation_update_params.rbs +4 -4
  26. data/sig/openai/models/conversations/message.rbs +13 -0
  27. data/sig/openai/models/realtime/realtime_mcp_tool_call.rbs +4 -4
  28. data/sig/openai/models/responses/response_content.rbs +13 -0
  29. data/sig/openai/models/responses/response_content_part_added_event.rbs +13 -0
  30. data/sig/openai/models/responses/response_content_part_done_event.rbs +13 -0
  31. data/sig/openai/resources/conversations.rbs +1 -1
  32. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9739da617fa34b8a5add655141558b5f984fa8c349236cf521605e748024cdb
4
- data.tar.gz: 44064a7817af7fc80e2e9e7bf5bb1df722472d074cfc9daa3abb6ae3f877f25d
3
+ metadata.gz: 63b13ff3a6e853278bda7f2dec0bfdf3b4f32873eed07e63bb19c5ffabef4d28
4
+ data.tar.gz: 82d504549c8cefef90f5b7a846b11876c0f8910c6f2eec40e4a8e78edde3d9c4
5
5
  SHA512:
6
- metadata.gz: 4067c143f59520175c9273966544511a35bb76690fa6685ee5292084714a3b81737ae0e8e689ce0294393ec57d3bfe355baf41159a0ba57a3e44908aef47618b
7
- data.tar.gz: 86f95667cf0b219500e4a90480a4b81a1daa781dbf2239db5bade3604208e45fcca9ed6cdd25428a5f76956884548c9a01c9bc2d5f5da0f71f4f5453857d10c1
6
+ metadata.gz: 86e4af688a02efb6ab796bb12653c5155ba67e999343898cc2716ffbd2fd8424464ab553d7981503dfd553d79bad080a83ea69f34bf6a96db7050f5835df11cc
7
+ data.tar.gz: 8c28b2b5c642c86af7b95817dd535fdde8c4023f68988b7ffd456c9bf45f192a9ae056e61e84681702bb4b150600c1579ab039b3123bc1b5928aa4acbe2724af
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.25.1 (2025-09-22)
4
+
5
+ Full Changelog: [v0.25.0...v0.25.1](https://github.com/openai/openai-ruby/compare/v0.25.0...v0.25.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **api:** fix mcp tool name ([25ec2ac](https://github.com/openai/openai-ruby/commit/25ec2aca164414f66a7d023c196ee6b1781c7146))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **api:** openapi updates for conversations ([ce76a59](https://github.com/openai/openai-ruby/commit/ce76a591d8c596d9eaeaa14077cec3146ffb1d0c))
15
+ * do not install brew dependencies in ./scripts/bootstrap by default ([3afa532](https://github.com/openai/openai-ruby/commit/3afa53231a90968bec2d361363334800463b436d))
16
+ * improve example values ([ad9a444](https://github.com/openai/openai-ruby/commit/ad9a4444e8a9af36f31368f19a095c1d4f4200ad))
17
+
18
+ ## 0.25.0 (2025-09-19)
19
+
20
+ Full Changelog: [v0.24.0...v0.25.0](https://github.com/openai/openai-ruby/compare/v0.24.0...v0.25.0)
21
+
22
+ ### Features
23
+
24
+ * **api:** add reasoning_text ([48073e9](https://github.com/openai/openai-ruby/commit/48073e955e50f7818fc0c422b7b5ce80c853536c))
25
+
3
26
  ## 0.24.0 (2025-09-17)
4
27
 
5
28
  Full Changelog: [v0.23.3...v0.24.0](https://github.com/openai/openai-ruby/compare/v0.23.3...v0.24.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.24.0"
18
+ gem "openai", "~> 0.25.1"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -32,7 +32,7 @@ module OpenAI
32
32
  # Some parameter documentations has been truncated, see
33
33
  # {OpenAI::Models::Conversations::ConversationCreateParams} for more details.
34
34
  #
35
- # @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil] Initial items to include in the conversation context.
35
+ # @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil] Initial items to include in the conversation context. You may add up to 20 items
36
36
  #
37
37
  # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
38
38
  #
@@ -11,18 +11,19 @@ module OpenAI
11
11
  # @!attribute metadata
12
12
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
13
13
  # for storing additional information about the object in a structured format, and
14
- # querying for objects via API or the dashboard. Keys are strings with a maximum
15
- # length of 64 characters. Values are strings with a maximum length of 512
16
- # characters.
14
+ # querying for objects via API or the dashboard.
17
15
  #
18
- # @return [Hash{Symbol=>String}]
19
- required :metadata, OpenAI::Internal::Type::HashOf[String]
16
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
17
+ # a maximum length of 512 characters.
18
+ #
19
+ # @return [Hash{Symbol=>String}, nil]
20
+ required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
20
21
 
21
22
  # @!method initialize(metadata:, request_options: {})
22
23
  # Some parameter documentations has been truncated, see
23
24
  # {OpenAI::Models::Conversations::ConversationUpdateParams} for more details.
24
25
  #
25
- # @param metadata [Hash{Symbol=>String}] Set of 16 key-value pairs that can be attached to an object. This can be
26
+ # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
26
27
  #
27
28
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
28
29
  end
@@ -13,7 +13,7 @@ module OpenAI
13
13
  # @!attribute content
14
14
  # The content of the message
15
15
  #
16
- # @return [Array<OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile>]
16
+ # @return [Array<OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Conversations::Message::Content::ReasoningText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile>]
17
17
  required :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Conversations::Message::Content] }
18
18
 
19
19
  # @!attribute role
@@ -44,7 +44,7 @@ module OpenAI
44
44
  #
45
45
  # @param id [String] The unique ID of the message.
46
46
  #
47
- # @param content [Array<OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile>] The content of the message
47
+ # @param content [Array<OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Conversations::Message::Content::ReasoningText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile>] The content of the message
48
48
  #
49
49
  # @param role [Symbol, OpenAI::Models::Conversations::Message::Role] The role of the message. One of `unknown`, `user`, `assistant`, `system`, `criti
50
50
  #
@@ -70,6 +70,9 @@ module OpenAI
70
70
  # A summary text from the model.
71
71
  variant :summary_text, -> { OpenAI::Conversations::SummaryTextContent }
72
72
 
73
+ # Reasoning text from the model.
74
+ variant :reasoning_text, -> { OpenAI::Conversations::Message::Content::ReasoningText }
75
+
73
76
  # A refusal from the model.
74
77
  variant :refusal, -> { OpenAI::Responses::ResponseOutputRefusal }
75
78
 
@@ -82,8 +85,29 @@ module OpenAI
82
85
  # A file input to the model.
83
86
  variant :input_file, -> { OpenAI::Responses::ResponseInputFile }
84
87
 
88
+ class ReasoningText < OpenAI::Internal::Type::BaseModel
89
+ # @!attribute text
90
+ # The reasoning text from the model.
91
+ #
92
+ # @return [String]
93
+ required :text, String
94
+
95
+ # @!attribute type
96
+ # The type of the reasoning text. Always `reasoning_text`.
97
+ #
98
+ # @return [Symbol, :reasoning_text]
99
+ required :type, const: :reasoning_text
100
+
101
+ # @!method initialize(text:, type: :reasoning_text)
102
+ # Reasoning text from the model.
103
+ #
104
+ # @param text [String] The reasoning text from the model.
105
+ #
106
+ # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
107
+ end
108
+
85
109
  # @!method self.variants
86
- # @return [Array(OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile)]
110
+ # @return [Array(OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Conversations::Message::Content::ReasoningText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile)]
87
111
  end
88
112
 
89
113
  # The role of the message. One of `unknown`, `user`, `assistant`, `system`,
@@ -5,11 +5,13 @@ module OpenAI
5
5
  module Conversations
6
6
  class SummaryTextContent < OpenAI::Internal::Type::BaseModel
7
7
  # @!attribute text
8
+ # A summary of the reasoning output from the model so far.
8
9
  #
9
10
  # @return [String]
10
11
  required :text, String
11
12
 
12
13
  # @!attribute type
14
+ # The type of the object. Always `summary_text`.
13
15
  #
14
16
  # @return [Symbol, :summary_text]
15
17
  required :type, const: :summary_text
@@ -17,8 +19,9 @@ module OpenAI
17
19
  # @!method initialize(text:, type: :summary_text)
18
20
  # A summary text from the model.
19
21
  #
20
- # @param text [String]
21
- # @param type [Symbol, :summary_text]
22
+ # @param text [String] A summary of the reasoning output from the model so far.
23
+ #
24
+ # @param type [Symbol, :summary_text] The type of the object. Always `summary_text`.
22
25
  end
23
26
  end
24
27
  end
@@ -31,7 +31,7 @@ module OpenAI
31
31
  variant :mcp_list_tools, -> { OpenAI::Realtime::RealtimeMcpListTools }
32
32
 
33
33
  # A Realtime item representing an invocation of a tool on an MCP server.
34
- variant :mcp_tool_call, -> { OpenAI::Realtime::RealtimeMcpToolCall }
34
+ variant :mcp_call, -> { OpenAI::Realtime::RealtimeMcpToolCall }
35
35
 
36
36
  # A Realtime item requesting human approval of a tool invocation.
37
37
  variant :mcp_approval_request, -> { OpenAI::Realtime::RealtimeMcpApprovalRequest }
@@ -29,10 +29,10 @@ module OpenAI
29
29
  required :server_label, String
30
30
 
31
31
  # @!attribute type
32
- # The type of the item. Always `mcp_tool_call`.
32
+ # The type of the item. Always `mcp_call`.
33
33
  #
34
- # @return [Symbol, :mcp_tool_call]
35
- required :type, const: :mcp_tool_call
34
+ # @return [Symbol, :mcp_call]
35
+ required :type, const: :mcp_call
36
36
 
37
37
  # @!attribute approval_request_id
38
38
  # The ID of an associated approval request, if any.
@@ -52,7 +52,7 @@ module OpenAI
52
52
  # @return [String, nil]
53
53
  optional :output, String, nil?: true
54
54
 
55
- # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, type: :mcp_tool_call)
55
+ # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, type: :mcp_call)
56
56
  # A Realtime item representing an invocation of a tool on an MCP server.
57
57
  #
58
58
  # @param id [String] The unique ID of the tool call.
@@ -69,7 +69,7 @@ module OpenAI
69
69
  #
70
70
  # @param output [String, nil] The output from the tool call.
71
71
  #
72
- # @param type [Symbol, :mcp_tool_call] The type of the item. Always `mcp_tool_call`.
72
+ # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`.
73
73
 
74
74
  # The error from the tool call, if any.
75
75
  #
@@ -25,8 +25,32 @@ module OpenAI
25
25
  # A refusal from the model.
26
26
  variant -> { OpenAI::Responses::ResponseOutputRefusal }
27
27
 
28
+ # Reasoning text from the model.
29
+ variant -> { OpenAI::Responses::ResponseContent::ReasoningTextContent }
30
+
31
+ class ReasoningTextContent < OpenAI::Internal::Type::BaseModel
32
+ # @!attribute text
33
+ # The reasoning text from the model.
34
+ #
35
+ # @return [String]
36
+ required :text, String
37
+
38
+ # @!attribute type
39
+ # The type of the reasoning text. Always `reasoning_text`.
40
+ #
41
+ # @return [Symbol, :reasoning_text]
42
+ required :type, const: :reasoning_text
43
+
44
+ # @!method initialize(text:, type: :reasoning_text)
45
+ # Reasoning text from the model.
46
+ #
47
+ # @param text [String] The reasoning text from the model.
48
+ #
49
+ # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
50
+ end
51
+
28
52
  # @!method self.variants
29
- # @return [Array(OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Responses::ResponseInputFile, OpenAI::Models::Responses::ResponseInputAudio, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal)]
53
+ # @return [Array(OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Responses::ResponseInputFile, OpenAI::Models::Responses::ResponseInputAudio, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContent::ReasoningTextContent)]
30
54
  end
31
55
  end
32
56
  end
@@ -25,7 +25,7 @@ module OpenAI
25
25
  # @!attribute part
26
26
  # The content part that was added.
27
27
  #
28
- # @return [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal]
28
+ # @return [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText]
29
29
  required :part, union: -> { OpenAI::Responses::ResponseContentPartAddedEvent::Part }
30
30
 
31
31
  # @!attribute sequence_number
@@ -52,7 +52,7 @@ module OpenAI
52
52
  #
53
53
  # @param output_index [Integer] The index of the output item that the content part was added to.
54
54
  #
55
- # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal] The content part that was added.
55
+ # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText] The content part that was added.
56
56
  #
57
57
  # @param sequence_number [Integer] The sequence number of this event.
58
58
  #
@@ -72,8 +72,32 @@ module OpenAI
72
72
  # A refusal from the model.
73
73
  variant :refusal, -> { OpenAI::Responses::ResponseOutputRefusal }
74
74
 
75
+ # Reasoning text from the model.
76
+ variant :reasoning_text, -> { OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText }
77
+
78
+ class ReasoningText < OpenAI::Internal::Type::BaseModel
79
+ # @!attribute text
80
+ # The reasoning text from the model.
81
+ #
82
+ # @return [String]
83
+ required :text, String
84
+
85
+ # @!attribute type
86
+ # The type of the reasoning text. Always `reasoning_text`.
87
+ #
88
+ # @return [Symbol, :reasoning_text]
89
+ required :type, const: :reasoning_text
90
+
91
+ # @!method initialize(text:, type: :reasoning_text)
92
+ # Reasoning text from the model.
93
+ #
94
+ # @param text [String] The reasoning text from the model.
95
+ #
96
+ # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
97
+ end
98
+
75
99
  # @!method self.variants
76
- # @return [Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal)]
100
+ # @return [Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText)]
77
101
  end
78
102
  end
79
103
  end
@@ -25,7 +25,7 @@ module OpenAI
25
25
  # @!attribute part
26
26
  # The content part that is done.
27
27
  #
28
- # @return [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal]
28
+ # @return [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText]
29
29
  required :part, union: -> { OpenAI::Responses::ResponseContentPartDoneEvent::Part }
30
30
 
31
31
  # @!attribute sequence_number
@@ -52,7 +52,7 @@ module OpenAI
52
52
  #
53
53
  # @param output_index [Integer] The index of the output item that the content part was added to.
54
54
  #
55
- # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal] The content part that is done.
55
+ # @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText] The content part that is done.
56
56
  #
57
57
  # @param sequence_number [Integer] The sequence number of this event.
58
58
  #
@@ -72,8 +72,32 @@ module OpenAI
72
72
  # A refusal from the model.
73
73
  variant :refusal, -> { OpenAI::Responses::ResponseOutputRefusal }
74
74
 
75
+ # Reasoning text from the model.
76
+ variant :reasoning_text, -> { OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText }
77
+
78
+ class ReasoningText < OpenAI::Internal::Type::BaseModel
79
+ # @!attribute text
80
+ # The reasoning text from the model.
81
+ #
82
+ # @return [String]
83
+ required :text, String
84
+
85
+ # @!attribute type
86
+ # The type of the reasoning text. Always `reasoning_text`.
87
+ #
88
+ # @return [Symbol, :reasoning_text]
89
+ required :type, const: :reasoning_text
90
+
91
+ # @!method initialize(text:, type: :reasoning_text)
92
+ # Reasoning text from the model.
93
+ #
94
+ # @param text [String] The reasoning text from the model.
95
+ #
96
+ # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
97
+ end
98
+
75
99
  # @!method self.variants
76
- # @return [Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal)]
100
+ # @return [Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText)]
77
101
  end
78
102
  end
79
103
  end
@@ -79,8 +79,7 @@ module OpenAI
79
79
  required :type, const: :summary_text
80
80
 
81
81
  # @!method initialize(text:, type: :summary_text)
82
- # Some parameter documentations has been truncated, see
83
- # {OpenAI::Models::Responses::ResponseReasoningItem::Summary} for more details.
82
+ # A summary text from the model.
84
83
  #
85
84
  # @param text [String] A summary of the reasoning output from the model so far.
86
85
  #
@@ -89,24 +88,23 @@ module OpenAI
89
88
 
90
89
  class Content < OpenAI::Internal::Type::BaseModel
91
90
  # @!attribute text
92
- # Reasoning text output from the model.
91
+ # The reasoning text from the model.
93
92
  #
94
93
  # @return [String]
95
94
  required :text, String
96
95
 
97
96
  # @!attribute type
98
- # The type of the object. Always `reasoning_text`.
97
+ # The type of the reasoning text. Always `reasoning_text`.
99
98
  #
100
99
  # @return [Symbol, :reasoning_text]
101
100
  required :type, const: :reasoning_text
102
101
 
103
102
  # @!method initialize(text:, type: :reasoning_text)
104
- # Some parameter documentations has been truncated, see
105
- # {OpenAI::Models::Responses::ResponseReasoningItem::Content} for more details.
103
+ # Reasoning text from the model.
106
104
  #
107
- # @param text [String] Reasoning text output from the model.
105
+ # @param text [String] The reasoning text from the model.
108
106
  #
109
- # @param type [Symbol, :reasoning_text] The type of the object. Always `reasoning_text`.
107
+ # @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
110
108
  end
111
109
 
112
110
  # The status of the item. One of `in_progress`, `completed`, or `incomplete`.
@@ -13,7 +13,7 @@ module OpenAI
13
13
  #
14
14
  # @overload create(items: nil, metadata: nil, request_options: {})
15
15
  #
16
- # @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil] Initial items to include in the conversation context.
16
+ # @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil] Initial items to include in the conversation context. You may add up to 20 items
17
17
  #
18
18
  # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
19
19
  #
@@ -33,7 +33,7 @@ module OpenAI
33
33
  )
34
34
  end
35
35
 
36
- # Get a conversation with the given ID.
36
+ # Get a conversation
37
37
  #
38
38
  # @overload retrieve(conversation_id, request_options: {})
39
39
  #
@@ -56,13 +56,13 @@ module OpenAI
56
56
  # Some parameter documentations has been truncated, see
57
57
  # {OpenAI::Models::Conversations::ConversationUpdateParams} for more details.
58
58
  #
59
- # Update a conversation's metadata with the given ID.
59
+ # Update a conversation
60
60
  #
61
61
  # @overload update(conversation_id, metadata:, request_options: {})
62
62
  #
63
63
  # @param conversation_id [String] The ID of the conversation to update.
64
64
  #
65
- # @param metadata [Hash{Symbol=>String}] Set of 16 key-value pairs that can be attached to an object. This can be
65
+ # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
66
66
  #
67
67
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
68
68
  #
@@ -80,7 +80,7 @@ module OpenAI
80
80
  )
81
81
  end
82
82
 
83
- # Delete a conversation with the given ID.
83
+ # Delete a conversation. Items in the conversation will not be deleted.
84
84
  #
85
85
  # @overload delete(conversation_id, request_options: {})
86
86
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "0.24.0"
4
+ VERSION = "0.25.1"
5
5
  end
@@ -17,24 +17,26 @@ module OpenAI
17
17
 
18
18
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
19
19
  # for storing additional information about the object in a structured format, and
20
- # querying for objects via API or the dashboard. Keys are strings with a maximum
21
- # length of 64 characters. Values are strings with a maximum length of 512
22
- # characters.
23
- sig { returns(T::Hash[Symbol, String]) }
20
+ # querying for objects via API or the dashboard.
21
+ #
22
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
23
+ # a maximum length of 512 characters.
24
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
24
25
  attr_accessor :metadata
25
26
 
26
27
  sig do
27
28
  params(
28
- metadata: T::Hash[Symbol, String],
29
+ metadata: T.nilable(T::Hash[Symbol, String]),
29
30
  request_options: OpenAI::RequestOptions::OrHash
30
31
  ).returns(T.attached_class)
31
32
  end
32
33
  def self.new(
33
34
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
34
35
  # for storing additional information about the object in a structured format, and
35
- # querying for objects via API or the dashboard. Keys are strings with a maximum
36
- # length of 64 characters. Values are strings with a maximum length of 512
37
- # characters.
36
+ # querying for objects via API or the dashboard.
37
+ #
38
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
39
+ # a maximum length of 512 characters.
38
40
  metadata:,
39
41
  request_options: {}
40
42
  )
@@ -43,7 +45,7 @@ module OpenAI
43
45
  sig do
44
46
  override.returns(
45
47
  {
46
- metadata: T::Hash[Symbol, String],
48
+ metadata: T.nilable(T::Hash[Symbol, String]),
47
49
  request_options: OpenAI::RequestOptions
48
50
  }
49
51
  )
@@ -44,6 +44,7 @@ module OpenAI
44
44
  OpenAI::Responses::ResponseOutputText::OrHash,
45
45
  OpenAI::Conversations::TextContent::OrHash,
46
46
  OpenAI::Conversations::SummaryTextContent::OrHash,
47
+ OpenAI::Conversations::Message::Content::ReasoningText::OrHash,
47
48
  OpenAI::Responses::ResponseOutputRefusal::OrHash,
48
49
  OpenAI::Responses::ResponseInputImage::OrHash,
49
50
  OpenAI::Conversations::ComputerScreenshotContent::OrHash,
@@ -97,6 +98,7 @@ module OpenAI
97
98
  OpenAI::Responses::ResponseOutputText,
98
99
  OpenAI::Conversations::TextContent,
99
100
  OpenAI::Conversations::SummaryTextContent,
101
+ OpenAI::Conversations::Message::Content::ReasoningText,
100
102
  OpenAI::Responses::ResponseOutputRefusal,
101
103
  OpenAI::Responses::ResponseInputImage,
102
104
  OpenAI::Conversations::ComputerScreenshotContent,
@@ -104,6 +106,38 @@ module OpenAI
104
106
  )
105
107
  end
106
108
 
109
+ class ReasoningText < OpenAI::Internal::Type::BaseModel
110
+ OrHash =
111
+ T.type_alias do
112
+ T.any(
113
+ OpenAI::Conversations::Message::Content::ReasoningText,
114
+ OpenAI::Internal::AnyHash
115
+ )
116
+ end
117
+
118
+ # The reasoning text from the model.
119
+ sig { returns(String) }
120
+ attr_accessor :text
121
+
122
+ # The type of the reasoning text. Always `reasoning_text`.
123
+ sig { returns(Symbol) }
124
+ attr_accessor :type
125
+
126
+ # Reasoning text from the model.
127
+ sig { params(text: String, type: Symbol).returns(T.attached_class) }
128
+ def self.new(
129
+ # The reasoning text from the model.
130
+ text:,
131
+ # The type of the reasoning text. Always `reasoning_text`.
132
+ type: :reasoning_text
133
+ )
134
+ end
135
+
136
+ sig { override.returns({ text: String, type: Symbol }) }
137
+ def to_hash
138
+ end
139
+ end
140
+
107
141
  sig do
108
142
  override.returns(
109
143
  T::Array[OpenAI::Conversations::Message::Content::Variants]
@@ -12,15 +12,22 @@ module OpenAI
12
12
  )
13
13
  end
14
14
 
15
+ # A summary of the reasoning output from the model so far.
15
16
  sig { returns(String) }
16
17
  attr_accessor :text
17
18
 
19
+ # The type of the object. Always `summary_text`.
18
20
  sig { returns(Symbol) }
19
21
  attr_accessor :type
20
22
 
21
23
  # A summary text from the model.
22
24
  sig { params(text: String, type: Symbol).returns(T.attached_class) }
23
- def self.new(text:, type: :summary_text)
25
+ def self.new(
26
+ # A summary of the reasoning output from the model so far.
27
+ text:,
28
+ # The type of the object. Always `summary_text`.
29
+ type: :summary_text
30
+ )
24
31
  end
25
32
 
26
33
  sig { override.returns({ text: String, type: Symbol }) }
@@ -28,7 +28,7 @@ module OpenAI
28
28
  sig { returns(String) }
29
29
  attr_accessor :server_label
30
30
 
31
- # The type of the item. Always `mcp_tool_call`.
31
+ # The type of the item. Always `mcp_call`.
32
32
  sig { returns(Symbol) }
33
33
  attr_accessor :type
34
34
 
@@ -89,8 +89,8 @@ module OpenAI
89
89
  error: nil,
90
90
  # The output from the tool call.
91
91
  output: nil,
92
- # The type of the item. Always `mcp_tool_call`.
93
- type: :mcp_tool_call
92
+ # The type of the item. Always `mcp_call`.
93
+ type: :mcp_call
94
94
  )
95
95
  end
96
96
 
@@ -15,10 +15,43 @@ module OpenAI
15
15
  OpenAI::Responses::ResponseInputFile,
16
16
  OpenAI::Responses::ResponseInputAudio,
17
17
  OpenAI::Responses::ResponseOutputText,
18
- OpenAI::Responses::ResponseOutputRefusal
18
+ OpenAI::Responses::ResponseOutputRefusal,
19
+ OpenAI::Responses::ResponseContent::ReasoningTextContent
19
20
  )
20
21
  end
21
22
 
23
+ class ReasoningTextContent < OpenAI::Internal::Type::BaseModel
24
+ OrHash =
25
+ T.type_alias do
26
+ T.any(
27
+ OpenAI::Responses::ResponseContent::ReasoningTextContent,
28
+ OpenAI::Internal::AnyHash
29
+ )
30
+ end
31
+
32
+ # The reasoning text from the model.
33
+ sig { returns(String) }
34
+ attr_accessor :text
35
+
36
+ # The type of the reasoning text. Always `reasoning_text`.
37
+ sig { returns(Symbol) }
38
+ attr_accessor :type
39
+
40
+ # Reasoning text from the model.
41
+ sig { params(text: String, type: Symbol).returns(T.attached_class) }
42
+ def self.new(
43
+ # The reasoning text from the model.
44
+ text:,
45
+ # The type of the reasoning text. Always `reasoning_text`.
46
+ type: :reasoning_text
47
+ )
48
+ end
49
+
50
+ sig { override.returns({ text: String, type: Symbol }) }
51
+ def to_hash
52
+ end
53
+ end
54
+
22
55
  sig do
23
56
  override.returns(
24
57
  T::Array[OpenAI::Responses::ResponseContent::Variants]
@@ -49,7 +49,8 @@ module OpenAI
49
49
  part:
50
50
  T.any(
51
51
  OpenAI::Responses::ResponseOutputText::OrHash,
52
- OpenAI::Responses::ResponseOutputRefusal::OrHash
52
+ OpenAI::Responses::ResponseOutputRefusal::OrHash,
53
+ OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText::OrHash
53
54
  ),
54
55
  sequence_number: Integer,
55
56
  type: Symbol
@@ -95,10 +96,43 @@ module OpenAI
95
96
  T.type_alias do
96
97
  T.any(
97
98
  OpenAI::Responses::ResponseOutputText,
98
- OpenAI::Responses::ResponseOutputRefusal
99
+ OpenAI::Responses::ResponseOutputRefusal,
100
+ OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText
99
101
  )
100
102
  end
101
103
 
104
+ class ReasoningText < OpenAI::Internal::Type::BaseModel
105
+ OrHash =
106
+ T.type_alias do
107
+ T.any(
108
+ OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText,
109
+ OpenAI::Internal::AnyHash
110
+ )
111
+ end
112
+
113
+ # The reasoning text from the model.
114
+ sig { returns(String) }
115
+ attr_accessor :text
116
+
117
+ # The type of the reasoning text. Always `reasoning_text`.
118
+ sig { returns(Symbol) }
119
+ attr_accessor :type
120
+
121
+ # Reasoning text from the model.
122
+ sig { params(text: String, type: Symbol).returns(T.attached_class) }
123
+ def self.new(
124
+ # The reasoning text from the model.
125
+ text:,
126
+ # The type of the reasoning text. Always `reasoning_text`.
127
+ type: :reasoning_text
128
+ )
129
+ end
130
+
131
+ sig { override.returns({ text: String, type: Symbol }) }
132
+ def to_hash
133
+ end
134
+ end
135
+
102
136
  sig do
103
137
  override.returns(
104
138
  T::Array[
@@ -49,7 +49,8 @@ module OpenAI
49
49
  part:
50
50
  T.any(
51
51
  OpenAI::Responses::ResponseOutputText::OrHash,
52
- OpenAI::Responses::ResponseOutputRefusal::OrHash
52
+ OpenAI::Responses::ResponseOutputRefusal::OrHash,
53
+ OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText::OrHash
53
54
  ),
54
55
  sequence_number: Integer,
55
56
  type: Symbol
@@ -95,10 +96,43 @@ module OpenAI
95
96
  T.type_alias do
96
97
  T.any(
97
98
  OpenAI::Responses::ResponseOutputText,
98
- OpenAI::Responses::ResponseOutputRefusal
99
+ OpenAI::Responses::ResponseOutputRefusal,
100
+ OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText
99
101
  )
100
102
  end
101
103
 
104
+ class ReasoningText < OpenAI::Internal::Type::BaseModel
105
+ OrHash =
106
+ T.type_alias do
107
+ T.any(
108
+ OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText,
109
+ OpenAI::Internal::AnyHash
110
+ )
111
+ end
112
+
113
+ # The reasoning text from the model.
114
+ sig { returns(String) }
115
+ attr_accessor :text
116
+
117
+ # The type of the reasoning text. Always `reasoning_text`.
118
+ sig { returns(Symbol) }
119
+ attr_accessor :type
120
+
121
+ # Reasoning text from the model.
122
+ sig { params(text: String, type: Symbol).returns(T.attached_class) }
123
+ def self.new(
124
+ # The reasoning text from the model.
125
+ text:,
126
+ # The type of the reasoning text. Always `reasoning_text`.
127
+ type: :reasoning_text
128
+ )
129
+ end
130
+
131
+ sig { override.returns({ text: String, type: Symbol }) }
132
+ def to_hash
133
+ end
134
+ end
135
+
102
136
  sig do
103
137
  override.returns(
104
138
  T::Array[
@@ -141,6 +141,7 @@ module OpenAI
141
141
  sig { returns(Symbol) }
142
142
  attr_accessor :type
143
143
 
144
+ # A summary text from the model.
144
145
  sig { params(text: String, type: Symbol).returns(T.attached_class) }
145
146
  def self.new(
146
147
  # A summary of the reasoning output from the model so far.
@@ -164,19 +165,20 @@ module OpenAI
164
165
  )
165
166
  end
166
167
 
167
- # Reasoning text output from the model.
168
+ # The reasoning text from the model.
168
169
  sig { returns(String) }
169
170
  attr_accessor :text
170
171
 
171
- # The type of the object. Always `reasoning_text`.
172
+ # The type of the reasoning text. Always `reasoning_text`.
172
173
  sig { returns(Symbol) }
173
174
  attr_accessor :type
174
175
 
176
+ # Reasoning text from the model.
175
177
  sig { params(text: String, type: Symbol).returns(T.attached_class) }
176
178
  def self.new(
177
- # Reasoning text output from the model.
179
+ # The reasoning text from the model.
178
180
  text:,
179
- # The type of the object. Always `reasoning_text`.
181
+ # The type of the reasoning text. Always `reasoning_text`.
180
182
  type: :reasoning_text
181
183
  )
182
184
  end
@@ -56,7 +56,7 @@ module OpenAI
56
56
  )
57
57
  end
58
58
 
59
- # Get a conversation with the given ID.
59
+ # Get a conversation
60
60
  sig do
61
61
  params(
62
62
  conversation_id: String,
@@ -70,11 +70,11 @@ module OpenAI
70
70
  )
71
71
  end
72
72
 
73
- # Update a conversation's metadata with the given ID.
73
+ # Update a conversation
74
74
  sig do
75
75
  params(
76
76
  conversation_id: String,
77
- metadata: T::Hash[Symbol, String],
77
+ metadata: T.nilable(T::Hash[Symbol, String]),
78
78
  request_options: OpenAI::RequestOptions::OrHash
79
79
  ).returns(OpenAI::Conversations::Conversation)
80
80
  end
@@ -83,15 +83,16 @@ module OpenAI
83
83
  conversation_id,
84
84
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
85
85
  # for storing additional information about the object in a structured format, and
86
- # querying for objects via API or the dashboard. Keys are strings with a maximum
87
- # length of 64 characters. Values are strings with a maximum length of 512
88
- # characters.
86
+ # querying for objects via API or the dashboard.
87
+ #
88
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
89
+ # a maximum length of 512 characters.
89
90
  metadata:,
90
91
  request_options: {}
91
92
  )
92
93
  end
93
94
 
94
- # Delete a conversation with the given ID.
95
+ # Delete a conversation. Items in the conversation will not be deleted.
95
96
  sig do
96
97
  params(
97
98
  conversation_id: String,
@@ -2,22 +2,22 @@ module OpenAI
2
2
  module Models
3
3
  module Conversations
4
4
  type conversation_update_params =
5
- { metadata: ::Hash[Symbol, String] }
5
+ { metadata: OpenAI::Models::metadata? }
6
6
  & OpenAI::Internal::Type::request_parameters
7
7
 
8
8
  class ConversationUpdateParams < OpenAI::Internal::Type::BaseModel
9
9
  extend OpenAI::Internal::Type::RequestParameters::Converter
10
10
  include OpenAI::Internal::Type::RequestParameters
11
11
 
12
- attr_accessor metadata: ::Hash[Symbol, String]
12
+ attr_accessor metadata: OpenAI::Models::metadata?
13
13
 
14
14
  def initialize: (
15
- metadata: ::Hash[Symbol, String],
15
+ metadata: OpenAI::Models::metadata?,
16
16
  ?request_options: OpenAI::request_opts
17
17
  ) -> void
18
18
 
19
19
  def to_hash: -> {
20
- metadata: ::Hash[Symbol, String],
20
+ metadata: OpenAI::Models::metadata?,
21
21
  request_options: OpenAI::RequestOptions
22
22
  }
23
23
  end
@@ -42,6 +42,7 @@ module OpenAI
42
42
  | OpenAI::Responses::ResponseOutputText
43
43
  | OpenAI::Conversations::TextContent
44
44
  | OpenAI::Conversations::SummaryTextContent
45
+ | OpenAI::Conversations::Message::Content::ReasoningText
45
46
  | OpenAI::Responses::ResponseOutputRefusal
46
47
  | OpenAI::Responses::ResponseInputImage
47
48
  | OpenAI::Conversations::ComputerScreenshotContent
@@ -50,6 +51,18 @@ module OpenAI
50
51
  module Content
51
52
  extend OpenAI::Internal::Type::Union
52
53
 
54
+ type reasoning_text = { text: String, type: :reasoning_text }
55
+
56
+ class ReasoningText < OpenAI::Internal::Type::BaseModel
57
+ attr_accessor text: String
58
+
59
+ attr_accessor type: :reasoning_text
60
+
61
+ def initialize: (text: String, ?type: :reasoning_text) -> void
62
+
63
+ def to_hash: -> { text: String, type: :reasoning_text }
64
+ end
65
+
53
66
  def self?.variants: -> ::Array[OpenAI::Models::Conversations::Message::content]
54
67
  end
55
68
 
@@ -7,7 +7,7 @@ module OpenAI
7
7
  arguments: String,
8
8
  name: String,
9
9
  server_label: String,
10
- type: :mcp_tool_call,
10
+ type: :mcp_call,
11
11
  approval_request_id: String?,
12
12
  error: OpenAI::Models::Realtime::RealtimeMcpToolCall::error?,
13
13
  output: String?
@@ -22,7 +22,7 @@ module OpenAI
22
22
 
23
23
  attr_accessor server_label: String
24
24
 
25
- attr_accessor type: :mcp_tool_call
25
+ attr_accessor type: :mcp_call
26
26
 
27
27
  attr_accessor approval_request_id: String?
28
28
 
@@ -38,7 +38,7 @@ module OpenAI
38
38
  ?approval_request_id: String?,
39
39
  ?error: OpenAI::Models::Realtime::RealtimeMcpToolCall::error?,
40
40
  ?output: String?,
41
- ?type: :mcp_tool_call
41
+ ?type: :mcp_call
42
42
  ) -> void
43
43
 
44
44
  def to_hash: -> {
@@ -46,7 +46,7 @@ module OpenAI
46
46
  arguments: String,
47
47
  name: String,
48
48
  server_label: String,
49
- type: :mcp_tool_call,
49
+ type: :mcp_call,
50
50
  approval_request_id: String?,
51
51
  error: OpenAI::Models::Realtime::RealtimeMcpToolCall::error?,
52
52
  output: String?
@@ -8,10 +8,23 @@ module OpenAI
8
8
  | OpenAI::Responses::ResponseInputAudio
9
9
  | OpenAI::Responses::ResponseOutputText
10
10
  | OpenAI::Responses::ResponseOutputRefusal
11
+ | OpenAI::Responses::ResponseContent::ReasoningTextContent
11
12
 
12
13
  module ResponseContent
13
14
  extend OpenAI::Internal::Type::Union
14
15
 
16
+ type reasoning_text_content = { text: String, type: :reasoning_text }
17
+
18
+ class ReasoningTextContent < OpenAI::Internal::Type::BaseModel
19
+ attr_accessor text: String
20
+
21
+ attr_accessor type: :reasoning_text
22
+
23
+ def initialize: (text: String, ?type: :reasoning_text) -> void
24
+
25
+ def to_hash: -> { text: String, type: :reasoning_text }
26
+ end
27
+
15
28
  def self?.variants: -> ::Array[OpenAI::Models::Responses::response_content]
16
29
  end
17
30
  end
@@ -45,10 +45,23 @@ module OpenAI
45
45
  type part =
46
46
  OpenAI::Responses::ResponseOutputText
47
47
  | OpenAI::Responses::ResponseOutputRefusal
48
+ | OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText
48
49
 
49
50
  module Part
50
51
  extend OpenAI::Internal::Type::Union
51
52
 
53
+ type reasoning_text = { text: String, type: :reasoning_text }
54
+
55
+ class ReasoningText < OpenAI::Internal::Type::BaseModel
56
+ attr_accessor text: String
57
+
58
+ attr_accessor type: :reasoning_text
59
+
60
+ def initialize: (text: String, ?type: :reasoning_text) -> void
61
+
62
+ def to_hash: -> { text: String, type: :reasoning_text }
63
+ end
64
+
52
65
  def self?.variants: -> ::Array[OpenAI::Models::Responses::ResponseContentPartAddedEvent::part]
53
66
  end
54
67
  end
@@ -45,10 +45,23 @@ module OpenAI
45
45
  type part =
46
46
  OpenAI::Responses::ResponseOutputText
47
47
  | OpenAI::Responses::ResponseOutputRefusal
48
+ | OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText
48
49
 
49
50
  module Part
50
51
  extend OpenAI::Internal::Type::Union
51
52
 
53
+ type reasoning_text = { text: String, type: :reasoning_text }
54
+
55
+ class ReasoningText < OpenAI::Internal::Type::BaseModel
56
+ attr_accessor text: String
57
+
58
+ attr_accessor type: :reasoning_text
59
+
60
+ def initialize: (text: String, ?type: :reasoning_text) -> void
61
+
62
+ def to_hash: -> { text: String, type: :reasoning_text }
63
+ end
64
+
52
65
  def self?.variants: -> ::Array[OpenAI::Models::Responses::ResponseContentPartDoneEvent::part]
53
66
  end
54
67
  end
@@ -16,7 +16,7 @@ module OpenAI
16
16
 
17
17
  def update: (
18
18
  String conversation_id,
19
- metadata: ::Hash[Symbol, String],
19
+ metadata: OpenAI::Models::metadata?,
20
20
  ?request_options: OpenAI::request_opts
21
21
  ) -> OpenAI::Conversations::Conversation
22
22
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.25.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-17 00:00:00.000000000 Z
11
+ date: 2025-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool