Skip to content

Commit 1d79621

Browse files
feat(api): manual updates
1 parent 7f8f2d3 commit 1d79621

21 files changed

+414
-293
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 109
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-721e6ccaa72205ee14c71f8163129920464fb814b95d3df9567a9476bbd9b7fb.yml
3-
openapi_spec_hash: 2115413a21df8b5bf9e4552a74df4312
4-
config_hash: 9606bb315a193bfd8da0459040143242
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d6a16b25b969c3e5382e7d413de15bf83d5f7534d5c3ecce64d3a7e847418f9e.yml
3+
openapi_spec_hash: 0c0bcf4aee9ca2a948dd14b890dfe728
4+
config_hash: aeff9289bd7f8c8482e4d738c3c2fde1

lib/openai.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,12 @@
426426
require_relative "openai/models/responses/response_prompt"
427427
require_relative "openai/models/responses/response_queued_event"
428428
require_relative "openai/models/responses/response_reasoning_item"
429-
require_relative "openai/models/responses/response_reasoning_summary_delta_event"
430-
require_relative "openai/models/responses/response_reasoning_summary_done_event"
431429
require_relative "openai/models/responses/response_reasoning_summary_part_added_event"
432430
require_relative "openai/models/responses/response_reasoning_summary_part_done_event"
433431
require_relative "openai/models/responses/response_reasoning_summary_text_delta_event"
434432
require_relative "openai/models/responses/response_reasoning_summary_text_done_event"
433+
require_relative "openai/models/responses/response_reasoning_text_delta_event"
434+
require_relative "openai/models/responses/response_reasoning_text_done_event"
435435
require_relative "openai/models/responses/response_refusal_delta_event"
436436
require_relative "openai/models/responses/response_refusal_done_event"
437437
require_relative "openai/models/responses/response_retrieve_params"

lib/openai/models/responses/response_reasoning_item.rb

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ResponseReasoningItem < OpenAI::Internal::Type::BaseModel
1111
required :id, String
1212

1313
# @!attribute summary
14-
# Reasoning text contents.
14+
# Reasoning summary content.
1515
#
1616
# @return [Array<OpenAI::Models::Responses::ResponseReasoningItem::Summary>]
1717
required :summary,
@@ -23,6 +23,13 @@ class ResponseReasoningItem < OpenAI::Internal::Type::BaseModel
2323
# @return [Symbol, :reasoning]
2424
required :type, const: :reasoning
2525

26+
# @!attribute content
27+
# Reasoning text content.
28+
#
29+
# @return [Array<OpenAI::Models::Responses::ResponseReasoningItem::Content>, nil]
30+
optional :content,
31+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::ResponseReasoningItem::Content] }
32+
2633
# @!attribute encrypted_content
2734
# The encrypted content of the reasoning item - populated when a response is
2835
# generated with `reasoning.encrypted_content` in the `include` parameter.
@@ -37,7 +44,7 @@ class ResponseReasoningItem < OpenAI::Internal::Type::BaseModel
3744
# @return [Symbol, OpenAI::Models::Responses::ResponseReasoningItem::Status, nil]
3845
optional :status, enum: -> { OpenAI::Responses::ResponseReasoningItem::Status }
3946

40-
# @!method initialize(id:, summary:, encrypted_content: nil, status: nil, type: :reasoning)
47+
# @!method initialize(id:, summary:, content: nil, encrypted_content: nil, status: nil, type: :reasoning)
4148
# Some parameter documentations has been truncated, see
4249
# {OpenAI::Models::Responses::ResponseReasoningItem} for more details.
4350
#
@@ -48,7 +55,9 @@ class ResponseReasoningItem < OpenAI::Internal::Type::BaseModel
4855
#
4956
# @param id [String] The unique identifier of the reasoning content.
5057
#
51-
# @param summary [Array<OpenAI::Models::Responses::ResponseReasoningItem::Summary>] Reasoning text contents.
58+
# @param summary [Array<OpenAI::Models::Responses::ResponseReasoningItem::Summary>] Reasoning summary content.
59+
#
60+
# @param content [Array<OpenAI::Models::Responses::ResponseReasoningItem::Content>] Reasoning text content.
5261
#
5362
# @param encrypted_content [String, nil] The encrypted content of the reasoning item - populated when a response is
5463
#
@@ -58,7 +67,7 @@ class ResponseReasoningItem < OpenAI::Internal::Type::BaseModel
5867

5968
class Summary < OpenAI::Internal::Type::BaseModel
6069
# @!attribute text
61-
# A short summary of the reasoning used by the model when generating the response.
70+
# A summary of the reasoning output from the model so far.
6271
#
6372
# @return [String]
6473
required :text, String
@@ -73,11 +82,33 @@ class Summary < OpenAI::Internal::Type::BaseModel
7382
# Some parameter documentations has been truncated, see
7483
# {OpenAI::Models::Responses::ResponseReasoningItem::Summary} for more details.
7584
#
76-
# @param text [String] A short summary of the reasoning used by the model when generating
85+
# @param text [String] A summary of the reasoning output from the model so far.
7786
#
7887
# @param type [Symbol, :summary_text] The type of the object. Always `summary_text`.
7988
end
8089

90+
class Content < OpenAI::Internal::Type::BaseModel
91+
# @!attribute text
92+
# Reasoning text output from the model.
93+
#
94+
# @return [String]
95+
required :text, String
96+
97+
# @!attribute type
98+
# The type of the object. Always `reasoning_text`.
99+
#
100+
# @return [Symbol, :reasoning_text]
101+
required :type, const: :reasoning_text
102+
103+
# @!method initialize(text:, type: :reasoning_text)
104+
# Some parameter documentations has been truncated, see
105+
# {OpenAI::Models::Responses::ResponseReasoningItem::Content} for more details.
106+
#
107+
# @param text [String] Reasoning text output from the model.
108+
#
109+
# @param type [Symbol, :reasoning_text] The type of the object. Always `reasoning_text`.
110+
end
111+
81112
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
82113
# Populated when items are returned via API.
83114
#

lib/openai/models/responses/response_reasoning_summary_delta_event.rb

Lines changed: 0 additions & 65 deletions
This file was deleted.

lib/openai/models/responses/response_reasoning_summary_done_event.rb

Lines changed: 0 additions & 60 deletions
This file was deleted.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# frozen_string_literal: true
2+
3+
module OpenAI
4+
module Models
5+
module Responses
6+
class ResponseReasoningTextDeltaEvent < OpenAI::Internal::Type::BaseModel
7+
# @!attribute content_index
8+
# The index of the reasoning content part this delta is associated with.
9+
#
10+
# @return [Integer]
11+
required :content_index, Integer
12+
13+
# @!attribute delta
14+
# The text delta that was added to the reasoning content.
15+
#
16+
# @return [String]
17+
required :delta, String
18+
19+
# @!attribute item_id
20+
# The ID of the item this reasoning text delta is associated with.
21+
#
22+
# @return [String]
23+
required :item_id, String
24+
25+
# @!attribute output_index
26+
# The index of the output item this reasoning text delta is associated with.
27+
#
28+
# @return [Integer]
29+
required :output_index, Integer
30+
31+
# @!attribute sequence_number
32+
# The sequence number of this event.
33+
#
34+
# @return [Integer]
35+
required :sequence_number, Integer
36+
37+
# @!attribute type
38+
# The type of the event. Always `response.reasoning_text.delta`.
39+
#
40+
# @return [Symbol, :"response.reasoning_text.delta"]
41+
required :type, const: :"response.reasoning_text.delta"
42+
43+
# @!method initialize(content_index:, delta:, item_id:, output_index:, sequence_number:, type: :"response.reasoning_text.delta")
44+
# Some parameter documentations has been truncated, see
45+
# {OpenAI::Models::Responses::ResponseReasoningTextDeltaEvent} for more details.
46+
#
47+
# Emitted when a delta is added to a reasoning text.
48+
#
49+
# @param content_index [Integer] The index of the reasoning content part this delta is associated with.
50+
#
51+
# @param delta [String] The text delta that was added to the reasoning content.
52+
#
53+
# @param item_id [String] The ID of the item this reasoning text delta is associated with.
54+
#
55+
# @param output_index [Integer] The index of the output item this reasoning text delta is associated with.
56+
#
57+
# @param sequence_number [Integer] The sequence number of this event.
58+
#
59+
# @param type [Symbol, :"response.reasoning_text.delta"] The type of the event. Always `response.reasoning_text.delta`.
60+
end
61+
end
62+
end
63+
end
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# frozen_string_literal: true
2+
3+
module OpenAI
4+
module Models
5+
module Responses
6+
class ResponseReasoningTextDoneEvent < OpenAI::Internal::Type::BaseModel
7+
# @!attribute content_index
8+
# The index of the reasoning content part.
9+
#
10+
# @return [Integer]
11+
required :content_index, Integer
12+
13+
# @!attribute item_id
14+
# The ID of the item this reasoning text is associated with.
15+
#
16+
# @return [String]
17+
required :item_id, String
18+
19+
# @!attribute output_index
20+
# The index of the output item this reasoning text is associated with.
21+
#
22+
# @return [Integer]
23+
required :output_index, Integer
24+
25+
# @!attribute sequence_number
26+
# The sequence number of this event.
27+
#
28+
# @return [Integer]
29+
required :sequence_number, Integer
30+
31+
# @!attribute text
32+
# The full text of the completed reasoning content.
33+
#
34+
# @return [String]
35+
required :text, String
36+
37+
# @!attribute type
38+
# The type of the event. Always `response.reasoning_text.done`.
39+
#
40+
# @return [Symbol, :"response.reasoning_text.done"]
41+
required :type, const: :"response.reasoning_text.done"
42+
43+
# @!method initialize(content_index:, item_id:, output_index:, sequence_number:, text:, type: :"response.reasoning_text.done")
44+
# Some parameter documentations has been truncated, see
45+
# {OpenAI::Models::Responses::ResponseReasoningTextDoneEvent} for more details.
46+
#
47+
# Emitted when a reasoning text is completed.
48+
#
49+
# @param content_index [Integer] The index of the reasoning content part.
50+
#
51+
# @param item_id [String] The ID of the item this reasoning text is associated with.
52+
#
53+
# @param output_index [Integer] The index of the output item this reasoning text is associated with.
54+
#
55+
# @param sequence_number [Integer] The sequence number of this event.
56+
#
57+
# @param text [String] The full text of the completed reasoning content.
58+
#
59+
# @param type [Symbol, :"response.reasoning_text.done"] The type of the event. Always `response.reasoning_text.done`.
60+
end
61+
end
62+
end
63+
end

0 commit comments

Comments
 (0)