openai 0.42.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +57 -0
- data/README.md +12 -18
- data/lib/openai/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/openai/models/audio/speech_create_params.rb +9 -7
- data/lib/openai/models/beta/assistant.rb +2 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +7 -5
- data/lib/openai/models/conversations/conversation_item.rb +1 -1
- data/lib/openai/models/conversations/message.rb +1 -1
- data/lib/openai/models/file_create_params.rb +9 -5
- data/lib/openai/models/file_purpose.rb +8 -4
- data/lib/openai/models/realtime/conversation_item_create_event.rb +9 -5
- data/lib/openai/models/realtime/realtime_audio_config_output.rb +9 -9
- data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +9 -9
- data/lib/openai/models/realtime/response_function_call_arguments_done_event.rb +9 -1
- data/lib/openai/models/responses/input_token_count_params.rb +4 -7
- data/lib/openai/models/responses/response.rb +17 -8
- data/lib/openai/models/responses/response_compact_params.rb +1 -0
- data/lib/openai/models/responses/response_compaction_item.rb +4 -2
- data/lib/openai/models/responses/response_compaction_item_param.rb +2 -1
- data/lib/openai/models/responses/response_computer_tool_call.rb +6 -6
- data/lib/openai/models/responses/response_function_call_output_item.rb +1 -1
- data/lib/openai/models/responses/response_function_shell_tool_call_output.rb +35 -7
- data/lib/openai/models/responses/response_function_web_search.rb +26 -18
- data/lib/openai/models/responses/response_input_item.rb +28 -1
- data/lib/openai/models/responses/response_item.rb +1 -1
- data/lib/openai/models/responses/response_output_item.rb +1 -1
- data/lib/openai/models/responses/response_output_text.rb +1 -1
- data/lib/openai/models/responses/tool.rb +30 -2
- data/lib/openai/models/video_create_error.rb +7 -2
- data/lib/openai/resources/audio/speech.rb +1 -1
- data/lib/openai/resources/beta/assistants.rb +10 -0
- data/lib/openai/resources/files.rb +3 -3
- data/lib/openai/resources/images.rb +4 -2
- data/lib/openai/resources/responses/input_tokens.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/audio/speech_create_params.rbi +12 -9
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +9 -6
- data/rbi/openai/models/conversations/message.rbi +1 -1
- data/rbi/openai/models/file_create_params.rbi +16 -8
- data/rbi/openai/models/file_purpose.rbi +8 -4
- data/rbi/openai/models/realtime/conversation_item_create_event.rbi +16 -8
- data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +12 -12
- data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +12 -12
- data/rbi/openai/models/realtime/response_function_call_arguments_done_event.rbi +8 -0
- data/rbi/openai/models/responses/input_token_count_params.rbi +3 -9
- data/rbi/openai/models/responses/response.rbi +18 -8
- data/rbi/openai/models/responses/response_compaction_item.rbi +4 -0
- data/rbi/openai/models/responses/response_compaction_item_param.rbi +2 -0
- data/rbi/openai/models/responses/response_function_call_output_item.rbi +1 -1
- data/rbi/openai/models/responses/response_function_shell_tool_call_output.rbi +67 -2
- data/rbi/openai/models/responses/response_function_web_search.rbi +26 -11
- data/rbi/openai/models/responses/response_input_item.rbi +61 -1
- data/rbi/openai/models/responses/response_output_text.rbi +1 -1
- data/rbi/openai/models/responses/tool.rbi +68 -0
- data/rbi/openai/models/video_create_error.rbi +9 -1
- data/rbi/openai/resources/audio/speech.rbi +4 -3
- data/rbi/openai/resources/files.rbi +10 -6
- data/rbi/openai/resources/images.rbi +4 -2
- data/rbi/openai/resources/responses/input_tokens.rbi +1 -3
- data/sig/openai/models/realtime/response_function_call_arguments_done_event.rbs +5 -0
- data/sig/openai/models/responses/response.rbs +5 -0
- data/sig/openai/models/responses/response_function_shell_tool_call_output.rbs +17 -0
- data/sig/openai/models/responses/response_function_web_search.rbs +24 -8
- data/sig/openai/models/responses/response_input_item.rbs +19 -2
- data/sig/openai/models/responses/tool.rbs +24 -1
- metadata +16 -2
|
@@ -21,8 +21,9 @@ module OpenAI
|
|
|
21
21
|
end
|
|
22
22
|
attr_accessor :format_
|
|
23
23
|
|
|
24
|
-
# The voice the model uses to respond. Supported voices are `alloy`,
|
|
25
|
-
# `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`,
|
|
24
|
+
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
25
|
+
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
26
|
+
# `marin`, and `cedar`.
|
|
26
27
|
sig do
|
|
27
28
|
returns(
|
|
28
29
|
T.any(
|
|
@@ -50,8 +51,9 @@ module OpenAI
|
|
|
50
51
|
# Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`,
|
|
51
52
|
# or `pcm16`.
|
|
52
53
|
format_:,
|
|
53
|
-
# The voice the model uses to respond. Supported voices are `alloy`,
|
|
54
|
-
# `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`,
|
|
54
|
+
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
55
|
+
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
56
|
+
# `marin`, and `cedar`.
|
|
55
57
|
voice:
|
|
56
58
|
)
|
|
57
59
|
end
|
|
@@ -124,8 +126,9 @@ module OpenAI
|
|
|
124
126
|
end
|
|
125
127
|
end
|
|
126
128
|
|
|
127
|
-
# The voice the model uses to respond. Supported voices are `alloy`,
|
|
128
|
-
# `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`,
|
|
129
|
+
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
130
|
+
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
131
|
+
# `marin`, and `cedar`.
|
|
129
132
|
module Voice
|
|
130
133
|
extend OpenAI::Internal::Type::Union
|
|
131
134
|
|
|
@@ -15,10 +15,14 @@ module OpenAI
|
|
|
15
15
|
sig { returns(OpenAI::Internal::FileInput) }
|
|
16
16
|
attr_accessor :file
|
|
17
17
|
|
|
18
|
-
# The intended purpose of the uploaded file. One of:
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
18
|
+
# The intended purpose of the uploaded file. One of:
|
|
19
|
+
#
|
|
20
|
+
# - `assistants`: Used in the Assistants API
|
|
21
|
+
# - `batch`: Used in the Batch API
|
|
22
|
+
# - `fine-tune`: Used for fine-tuning
|
|
23
|
+
# - `vision`: Images used for vision fine-tuning
|
|
24
|
+
# - `user_data`: Flexible file type for any purpose
|
|
25
|
+
# - `evals`: Used for eval data sets
|
|
22
26
|
sig { returns(OpenAI::FilePurpose::OrSymbol) }
|
|
23
27
|
attr_accessor :purpose
|
|
24
28
|
|
|
@@ -45,10 +49,14 @@ module OpenAI
|
|
|
45
49
|
def self.new(
|
|
46
50
|
# The File object (not file name) to be uploaded.
|
|
47
51
|
file:,
|
|
48
|
-
# The intended purpose of the uploaded file. One of:
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
+
# The intended purpose of the uploaded file. One of:
|
|
53
|
+
#
|
|
54
|
+
# - `assistants`: Used in the Assistants API
|
|
55
|
+
# - `batch`: Used in the Batch API
|
|
56
|
+
# - `fine-tune`: Used for fine-tuning
|
|
57
|
+
# - `vision`: Images used for vision fine-tuning
|
|
58
|
+
# - `user_data`: Flexible file type for any purpose
|
|
59
|
+
# - `evals`: Used for eval data sets
|
|
52
60
|
purpose:,
|
|
53
61
|
# The expiration policy for a file. By default, files with `purpose=batch` expire
|
|
54
62
|
# after 30 days and all other files are persisted until they are manually deleted.
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module OpenAI
|
|
4
4
|
module Models
|
|
5
|
-
# The intended purpose of the uploaded file. One of:
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
5
|
+
# The intended purpose of the uploaded file. One of:
|
|
6
|
+
#
|
|
7
|
+
# - `assistants`: Used in the Assistants API
|
|
8
|
+
# - `batch`: Used in the Batch API
|
|
9
|
+
# - `fine-tune`: Used for fine-tuning
|
|
10
|
+
# - `vision`: Images used for vision fine-tuning
|
|
11
|
+
# - `user_data`: Flexible file type for any purpose
|
|
12
|
+
# - `evals`: Used for eval data sets
|
|
9
13
|
module FilePurpose
|
|
10
14
|
extend OpenAI::Internal::Type::Enum
|
|
11
15
|
|
|
@@ -42,10 +42,14 @@ module OpenAI
|
|
|
42
42
|
attr_writer :event_id
|
|
43
43
|
|
|
44
44
|
# The ID of the preceding item after which the new item will be inserted. If not
|
|
45
|
-
# set, the new item will be appended to the end of the conversation.
|
|
46
|
-
#
|
|
47
|
-
# to
|
|
48
|
-
#
|
|
45
|
+
# set, the new item will be appended to the end of the conversation.
|
|
46
|
+
#
|
|
47
|
+
# If set to `root`, the new item will be added to the beginning of the
|
|
48
|
+
# conversation.
|
|
49
|
+
#
|
|
50
|
+
# If set to an existing ID, it allows an item to be inserted mid-conversation. If
|
|
51
|
+
# the ID cannot be found, an error will be returned and the item will not be
|
|
52
|
+
# added.
|
|
49
53
|
sig { returns(T.nilable(String)) }
|
|
50
54
|
attr_reader :previous_item_id
|
|
51
55
|
|
|
@@ -84,10 +88,14 @@ module OpenAI
|
|
|
84
88
|
# Optional client-generated ID used to identify this event.
|
|
85
89
|
event_id: nil,
|
|
86
90
|
# The ID of the preceding item after which the new item will be inserted. If not
|
|
87
|
-
# set, the new item will be appended to the end of the conversation.
|
|
88
|
-
#
|
|
89
|
-
# to
|
|
90
|
-
#
|
|
91
|
+
# set, the new item will be appended to the end of the conversation.
|
|
92
|
+
#
|
|
93
|
+
# If set to `root`, the new item will be added to the beginning of the
|
|
94
|
+
# conversation.
|
|
95
|
+
#
|
|
96
|
+
# If set to an existing ID, it allows an item to be inserted mid-conversation. If
|
|
97
|
+
# the ID cannot be found, an error will be returned and the item will not be
|
|
98
|
+
# added.
|
|
91
99
|
previous_item_id: nil,
|
|
92
100
|
# The event type, must be `conversation.item.create`.
|
|
93
101
|
type: :"conversation.item.create"
|
|
@@ -51,10 +51,10 @@ module OpenAI
|
|
|
51
51
|
sig { params(speed: Float).void }
|
|
52
52
|
attr_writer :speed
|
|
53
53
|
|
|
54
|
-
# The voice the model uses to respond.
|
|
55
|
-
#
|
|
56
|
-
# `
|
|
57
|
-
#
|
|
54
|
+
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
55
|
+
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
56
|
+
# `cedar`. Voice cannot be changed during the session once the model has responded
|
|
57
|
+
# with audio at least once. We recommend `marin` and `cedar` for best quality.
|
|
58
58
|
sig do
|
|
59
59
|
returns(
|
|
60
60
|
T.nilable(
|
|
@@ -105,10 +105,10 @@ module OpenAI
|
|
|
105
105
|
# This parameter is a post-processing adjustment to the audio after it is
|
|
106
106
|
# generated, it's also possible to prompt the model to speak faster or slower.
|
|
107
107
|
speed: nil,
|
|
108
|
-
# The voice the model uses to respond.
|
|
109
|
-
#
|
|
110
|
-
# `
|
|
111
|
-
#
|
|
108
|
+
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
109
|
+
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
110
|
+
# `cedar`. Voice cannot be changed during the session once the model has responded
|
|
111
|
+
# with audio at least once. We recommend `marin` and `cedar` for best quality.
|
|
112
112
|
voice: nil
|
|
113
113
|
)
|
|
114
114
|
end
|
|
@@ -134,10 +134,10 @@ module OpenAI
|
|
|
134
134
|
def to_hash
|
|
135
135
|
end
|
|
136
136
|
|
|
137
|
-
# The voice the model uses to respond.
|
|
138
|
-
#
|
|
139
|
-
# `
|
|
140
|
-
#
|
|
137
|
+
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
138
|
+
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
139
|
+
# `cedar`. Voice cannot be changed during the session once the model has responded
|
|
140
|
+
# with audio at least once. We recommend `marin` and `cedar` for best quality.
|
|
141
141
|
module Voice
|
|
142
142
|
extend OpenAI::Internal::Type::Union
|
|
143
143
|
|
|
@@ -85,10 +85,10 @@ module OpenAI
|
|
|
85
85
|
end
|
|
86
86
|
attr_writer :format_
|
|
87
87
|
|
|
88
|
-
# The voice the model uses to respond.
|
|
89
|
-
#
|
|
90
|
-
# `
|
|
91
|
-
#
|
|
88
|
+
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
89
|
+
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
90
|
+
# `cedar`. Voice cannot be changed during the session once the model has responded
|
|
91
|
+
# with audio at least once.
|
|
92
92
|
sig do
|
|
93
93
|
returns(
|
|
94
94
|
T.nilable(
|
|
@@ -130,10 +130,10 @@ module OpenAI
|
|
|
130
130
|
def self.new(
|
|
131
131
|
# The format of the output audio.
|
|
132
132
|
format_: nil,
|
|
133
|
-
# The voice the model uses to respond.
|
|
134
|
-
#
|
|
135
|
-
# `
|
|
136
|
-
#
|
|
133
|
+
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
134
|
+
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
135
|
+
# `cedar`. Voice cannot be changed during the session once the model has responded
|
|
136
|
+
# with audio at least once.
|
|
137
137
|
voice: nil
|
|
138
138
|
)
|
|
139
139
|
end
|
|
@@ -158,10 +158,10 @@ module OpenAI
|
|
|
158
158
|
def to_hash
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
-
# The voice the model uses to respond.
|
|
162
|
-
#
|
|
163
|
-
# `
|
|
164
|
-
#
|
|
161
|
+
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
162
|
+
# `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
|
|
163
|
+
# `cedar`. Voice cannot be changed during the session once the model has responded
|
|
164
|
+
# with audio at least once.
|
|
165
165
|
module Voice
|
|
166
166
|
extend OpenAI::Internal::Type::Union
|
|
167
167
|
|
|
@@ -28,6 +28,10 @@ module OpenAI
|
|
|
28
28
|
sig { returns(String) }
|
|
29
29
|
attr_accessor :item_id
|
|
30
30
|
|
|
31
|
+
# The name of the function that was called.
|
|
32
|
+
sig { returns(String) }
|
|
33
|
+
attr_accessor :name
|
|
34
|
+
|
|
31
35
|
# The index of the output item in the response.
|
|
32
36
|
sig { returns(Integer) }
|
|
33
37
|
attr_accessor :output_index
|
|
@@ -48,6 +52,7 @@ module OpenAI
|
|
|
48
52
|
call_id: String,
|
|
49
53
|
event_id: String,
|
|
50
54
|
item_id: String,
|
|
55
|
+
name: String,
|
|
51
56
|
output_index: Integer,
|
|
52
57
|
response_id: String,
|
|
53
58
|
type: Symbol
|
|
@@ -62,6 +67,8 @@ module OpenAI
|
|
|
62
67
|
event_id:,
|
|
63
68
|
# The ID of the function call item.
|
|
64
69
|
item_id:,
|
|
70
|
+
# The name of the function that was called.
|
|
71
|
+
name:,
|
|
65
72
|
# The index of the output item in the response.
|
|
66
73
|
output_index:,
|
|
67
74
|
# The ID of the response.
|
|
@@ -78,6 +85,7 @@ module OpenAI
|
|
|
78
85
|
call_id: String,
|
|
79
86
|
event_id: String,
|
|
80
87
|
item_id: String,
|
|
88
|
+
name: String,
|
|
81
89
|
output_index: Integer,
|
|
82
90
|
response_id: String,
|
|
83
91
|
type: Symbol
|
|
@@ -88,9 +88,7 @@ module OpenAI
|
|
|
88
88
|
end
|
|
89
89
|
attr_writer :text
|
|
90
90
|
|
|
91
|
-
#
|
|
92
|
-
# response. See the `tools` parameter to see how to specify which tools the model
|
|
93
|
-
# can call.
|
|
91
|
+
# Controls which tool the model should use, if any.
|
|
94
92
|
sig do
|
|
95
93
|
returns(
|
|
96
94
|
T.nilable(
|
|
@@ -249,9 +247,7 @@ module OpenAI
|
|
|
249
247
|
# - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
250
248
|
# - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
251
249
|
text: nil,
|
|
252
|
-
#
|
|
253
|
-
# response. See the `tools` parameter to see how to specify which tools the model
|
|
254
|
-
# can call.
|
|
250
|
+
# Controls which tool the model should use, if any.
|
|
255
251
|
tool_choice: nil,
|
|
256
252
|
# An array of tools the model may call while generating a response. You can
|
|
257
253
|
# specify which tool to use by setting the `tool_choice` parameter.
|
|
@@ -540,9 +536,7 @@ module OpenAI
|
|
|
540
536
|
end
|
|
541
537
|
end
|
|
542
538
|
|
|
543
|
-
#
|
|
544
|
-
# response. See the `tools` parameter to see how to specify which tools the model
|
|
545
|
-
# can call.
|
|
539
|
+
# Controls which tool the model should use, if any.
|
|
546
540
|
module ToolChoice
|
|
547
541
|
extend OpenAI::Internal::Type::Union
|
|
548
542
|
|
|
@@ -139,8 +139,13 @@ module OpenAI
|
|
|
139
139
|
sig { returns(T.nilable(T::Boolean)) }
|
|
140
140
|
attr_accessor :background
|
|
141
141
|
|
|
142
|
-
#
|
|
143
|
-
#
|
|
142
|
+
# Unix timestamp (in seconds) of when this Response was completed. Only present
|
|
143
|
+
# when the status is `completed`.
|
|
144
|
+
sig { returns(T.nilable(Float)) }
|
|
145
|
+
attr_accessor :completed_at
|
|
146
|
+
|
|
147
|
+
# The conversation that this response belonged to. Input items and output items
|
|
148
|
+
# from this response were automatically added to this conversation.
|
|
144
149
|
sig { returns(T.nilable(OpenAI::Responses::Response::Conversation)) }
|
|
145
150
|
attr_reader :conversation
|
|
146
151
|
|
|
@@ -380,6 +385,7 @@ module OpenAI
|
|
|
380
385
|
],
|
|
381
386
|
top_p: T.nilable(Float),
|
|
382
387
|
background: T.nilable(T::Boolean),
|
|
388
|
+
completed_at: T.nilable(Float),
|
|
383
389
|
conversation:
|
|
384
390
|
T.nilable(OpenAI::Responses::Response::Conversation::OrHash),
|
|
385
391
|
max_output_tokens: T.nilable(Integer),
|
|
@@ -481,8 +487,11 @@ module OpenAI
|
|
|
481
487
|
# Whether to run the model response in the background.
|
|
482
488
|
# [Learn more](https://platform.openai.com/docs/guides/background).
|
|
483
489
|
background: nil,
|
|
484
|
-
#
|
|
485
|
-
#
|
|
490
|
+
# Unix timestamp (in seconds) of when this Response was completed. Only present
|
|
491
|
+
# when the status is `completed`.
|
|
492
|
+
completed_at: nil,
|
|
493
|
+
# The conversation that this response belonged to. Input items and output items
|
|
494
|
+
# from this response were automatically added to this conversation.
|
|
486
495
|
conversation: nil,
|
|
487
496
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
488
497
|
# including visible output tokens and
|
|
@@ -592,6 +601,7 @@ module OpenAI
|
|
|
592
601
|
tools: T::Array[OpenAI::Responses::Tool::Variants],
|
|
593
602
|
top_p: T.nilable(Float),
|
|
594
603
|
background: T.nilable(T::Boolean),
|
|
604
|
+
completed_at: T.nilable(Float),
|
|
595
605
|
conversation:
|
|
596
606
|
T.nilable(OpenAI::Responses::Response::Conversation),
|
|
597
607
|
max_output_tokens: T.nilable(Integer),
|
|
@@ -782,15 +792,15 @@ module OpenAI
|
|
|
782
792
|
)
|
|
783
793
|
end
|
|
784
794
|
|
|
785
|
-
# The unique ID of the conversation.
|
|
795
|
+
# The unique ID of the conversation that this response was associated with.
|
|
786
796
|
sig { returns(String) }
|
|
787
797
|
attr_accessor :id
|
|
788
798
|
|
|
789
|
-
# The conversation that this response
|
|
790
|
-
# from this response
|
|
799
|
+
# The conversation that this response belonged to. Input items and output items
|
|
800
|
+
# from this response were automatically added to this conversation.
|
|
791
801
|
sig { params(id: String).returns(T.attached_class) }
|
|
792
802
|
def self.new(
|
|
793
|
-
# The unique ID of the conversation.
|
|
803
|
+
# The unique ID of the conversation that this response was associated with.
|
|
794
804
|
id:
|
|
795
805
|
)
|
|
796
806
|
end
|
|
@@ -16,6 +16,7 @@ module OpenAI
|
|
|
16
16
|
sig { returns(String) }
|
|
17
17
|
attr_accessor :id
|
|
18
18
|
|
|
19
|
+
# The encrypted content that was produced by compaction.
|
|
19
20
|
sig { returns(String) }
|
|
20
21
|
attr_accessor :encrypted_content
|
|
21
22
|
|
|
@@ -23,6 +24,7 @@ module OpenAI
|
|
|
23
24
|
sig { returns(Symbol) }
|
|
24
25
|
attr_accessor :type
|
|
25
26
|
|
|
27
|
+
# The identifier of the actor that created the item.
|
|
26
28
|
sig { returns(T.nilable(String)) }
|
|
27
29
|
attr_reader :created_by
|
|
28
30
|
|
|
@@ -42,7 +44,9 @@ module OpenAI
|
|
|
42
44
|
def self.new(
|
|
43
45
|
# The unique ID of the compaction item.
|
|
44
46
|
id:,
|
|
47
|
+
# The encrypted content that was produced by compaction.
|
|
45
48
|
encrypted_content:,
|
|
49
|
+
# The identifier of the actor that created the item.
|
|
46
50
|
created_by: nil,
|
|
47
51
|
# The type of the item. Always `compaction`.
|
|
48
52
|
type: :compaction
|
|
@@ -12,6 +12,7 @@ module OpenAI
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
# The encrypted content of the compaction summary.
|
|
15
16
|
sig { returns(String) }
|
|
16
17
|
attr_accessor :encrypted_content
|
|
17
18
|
|
|
@@ -33,6 +34,7 @@ module OpenAI
|
|
|
33
34
|
).returns(T.attached_class)
|
|
34
35
|
end
|
|
35
36
|
def self.new(
|
|
37
|
+
# The encrypted content of the compaction summary.
|
|
36
38
|
encrypted_content:,
|
|
37
39
|
# The ID of the compaction item.
|
|
38
40
|
id: nil,
|
|
@@ -36,17 +36,27 @@ module OpenAI
|
|
|
36
36
|
end
|
|
37
37
|
attr_accessor :output
|
|
38
38
|
|
|
39
|
+
# The status of the shell call output. One of `in_progress`, `completed`, or
|
|
40
|
+
# `incomplete`.
|
|
41
|
+
sig do
|
|
42
|
+
returns(
|
|
43
|
+
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status::TaggedSymbol
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
attr_accessor :status
|
|
47
|
+
|
|
39
48
|
# The type of the shell call output. Always `shell_call_output`.
|
|
40
49
|
sig { returns(Symbol) }
|
|
41
50
|
attr_accessor :type
|
|
42
51
|
|
|
52
|
+
# The identifier of the actor that created the item.
|
|
43
53
|
sig { returns(T.nilable(String)) }
|
|
44
54
|
attr_reader :created_by
|
|
45
55
|
|
|
46
56
|
sig { params(created_by: String).void }
|
|
47
57
|
attr_writer :created_by
|
|
48
58
|
|
|
49
|
-
# The output of a shell tool call.
|
|
59
|
+
# The output of a shell tool call that was emitted.
|
|
50
60
|
sig do
|
|
51
61
|
params(
|
|
52
62
|
id: String,
|
|
@@ -56,6 +66,8 @@ module OpenAI
|
|
|
56
66
|
T::Array[
|
|
57
67
|
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output::OrHash
|
|
58
68
|
],
|
|
69
|
+
status:
|
|
70
|
+
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status::OrSymbol,
|
|
59
71
|
created_by: String,
|
|
60
72
|
type: Symbol
|
|
61
73
|
).returns(T.attached_class)
|
|
@@ -71,6 +83,10 @@ module OpenAI
|
|
|
71
83
|
max_output_length:,
|
|
72
84
|
# An array of shell call output contents
|
|
73
85
|
output:,
|
|
86
|
+
# The status of the shell call output. One of `in_progress`, `completed`, or
|
|
87
|
+
# `incomplete`.
|
|
88
|
+
status:,
|
|
89
|
+
# The identifier of the actor that created the item.
|
|
74
90
|
created_by: nil,
|
|
75
91
|
# The type of the shell call output. Always `shell_call_output`.
|
|
76
92
|
type: :shell_call_output
|
|
@@ -87,6 +103,8 @@ module OpenAI
|
|
|
87
103
|
T::Array[
|
|
88
104
|
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output
|
|
89
105
|
],
|
|
106
|
+
status:
|
|
107
|
+
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status::TaggedSymbol,
|
|
90
108
|
type: Symbol,
|
|
91
109
|
created_by: String
|
|
92
110
|
}
|
|
@@ -113,19 +131,22 @@ module OpenAI
|
|
|
113
131
|
end
|
|
114
132
|
attr_accessor :outcome
|
|
115
133
|
|
|
134
|
+
# The standard error output that was captured.
|
|
116
135
|
sig { returns(String) }
|
|
117
136
|
attr_accessor :stderr
|
|
118
137
|
|
|
138
|
+
# The standard output that was captured.
|
|
119
139
|
sig { returns(String) }
|
|
120
140
|
attr_accessor :stdout
|
|
121
141
|
|
|
142
|
+
# The identifier of the actor that created the item.
|
|
122
143
|
sig { returns(T.nilable(String)) }
|
|
123
144
|
attr_reader :created_by
|
|
124
145
|
|
|
125
146
|
sig { params(created_by: String).void }
|
|
126
147
|
attr_writer :created_by
|
|
127
148
|
|
|
128
|
-
# The content of a shell call output.
|
|
149
|
+
# The content of a shell tool call output that was emitted.
|
|
129
150
|
sig do
|
|
130
151
|
params(
|
|
131
152
|
outcome:
|
|
@@ -142,8 +163,11 @@ module OpenAI
|
|
|
142
163
|
# Represents either an exit outcome (with an exit code) or a timeout outcome for a
|
|
143
164
|
# shell call output chunk.
|
|
144
165
|
outcome:,
|
|
166
|
+
# The standard error output that was captured.
|
|
145
167
|
stderr:,
|
|
168
|
+
# The standard output that was captured.
|
|
146
169
|
stdout:,
|
|
170
|
+
# The identifier of the actor that created the item.
|
|
147
171
|
created_by: nil
|
|
148
172
|
)
|
|
149
173
|
end
|
|
@@ -248,6 +272,47 @@ module OpenAI
|
|
|
248
272
|
end
|
|
249
273
|
end
|
|
250
274
|
end
|
|
275
|
+
|
|
276
|
+
# The status of the shell call output. One of `in_progress`, `completed`, or
|
|
277
|
+
# `incomplete`.
|
|
278
|
+
module Status
|
|
279
|
+
extend OpenAI::Internal::Type::Enum
|
|
280
|
+
|
|
281
|
+
TaggedSymbol =
|
|
282
|
+
T.type_alias do
|
|
283
|
+
T.all(
|
|
284
|
+
Symbol,
|
|
285
|
+
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status
|
|
286
|
+
)
|
|
287
|
+
end
|
|
288
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
289
|
+
|
|
290
|
+
IN_PROGRESS =
|
|
291
|
+
T.let(
|
|
292
|
+
:in_progress,
|
|
293
|
+
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status::TaggedSymbol
|
|
294
|
+
)
|
|
295
|
+
COMPLETED =
|
|
296
|
+
T.let(
|
|
297
|
+
:completed,
|
|
298
|
+
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status::TaggedSymbol
|
|
299
|
+
)
|
|
300
|
+
INCOMPLETE =
|
|
301
|
+
T.let(
|
|
302
|
+
:incomplete,
|
|
303
|
+
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status::TaggedSymbol
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
sig do
|
|
307
|
+
override.returns(
|
|
308
|
+
T::Array[
|
|
309
|
+
OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status::TaggedSymbol
|
|
310
|
+
]
|
|
311
|
+
)
|
|
312
|
+
end
|
|
313
|
+
def self.values
|
|
314
|
+
end
|
|
315
|
+
end
|
|
251
316
|
end
|
|
252
317
|
end
|
|
253
318
|
end
|