openai 0.29.0 → 0.30.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 +8 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +4 -0
- data/lib/openai/internal/conversation_cursor_page.rb +2 -2
- data/lib/openai/models/all_models.rb +2 -0
- data/lib/openai/models/beta/chatkit/chat_session.rb +94 -0
- data/lib/openai/models/beta/chatkit/chat_session_automatic_thread_titling.rb +22 -0
- data/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration.rb +38 -0
- data/lib/openai/models/beta/chatkit/chat_session_chatkit_configuration_param.rb +125 -0
- data/lib/openai/models/beta/chatkit/chat_session_expires_after_param.rb +30 -0
- data/lib/openai/models/beta/chatkit/chat_session_file_upload.rb +38 -0
- data/lib/openai/models/beta/chatkit/chat_session_history.rb +34 -0
- data/lib/openai/models/beta/chatkit/chat_session_rate_limits.rb +22 -0
- data/lib/openai/models/beta/chatkit/chat_session_rate_limits_param.rb +22 -0
- data/lib/openai/models/beta/chatkit/chat_session_status.rb +20 -0
- data/lib/openai/models/beta/chatkit/chat_session_workflow_param.rb +80 -0
- data/lib/openai/models/beta/chatkit/chatkit_attachment.rb +69 -0
- data/lib/openai/models/beta/chatkit/chatkit_response_output_text.rb +143 -0
- data/lib/openai/models/beta/chatkit/chatkit_thread.rb +145 -0
- data/lib/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rb +65 -0
- data/lib/openai/models/beta/chatkit/chatkit_thread_item_list.rb +374 -0
- data/lib/openai/models/beta/chatkit/chatkit_thread_user_message_item.rb +183 -0
- data/lib/openai/models/beta/chatkit/chatkit_widget_item.rb +64 -0
- data/lib/openai/models/beta/chatkit/session_cancel_params.rb +18 -0
- data/lib/openai/models/beta/chatkit/session_create_params.rb +63 -0
- data/lib/openai/models/beta/chatkit/thread_delete_params.rb +18 -0
- data/lib/openai/models/beta/chatkit/thread_delete_response.rb +39 -0
- data/lib/openai/models/beta/chatkit/thread_list_items_params.rb +66 -0
- data/lib/openai/models/beta/chatkit/thread_list_params.rb +75 -0
- data/lib/openai/models/beta/chatkit/thread_retrieve_params.rb +18 -0
- data/lib/openai/models/beta/chatkit_upload_file_params.rb +28 -0
- data/lib/openai/models/beta/chatkit_upload_file_response.rb +25 -0
- data/lib/openai/models/beta/chatkit_workflow.rb +78 -0
- data/lib/openai/models/beta/file_part.rb +56 -0
- data/lib/openai/models/beta/image_part.rb +64 -0
- data/lib/openai/models/image_edit_params.rb +4 -2
- data/lib/openai/models/image_model.rb +1 -0
- data/lib/openai/models/realtime/realtime_session.rb +4 -0
- data/lib/openai/models/realtime/realtime_session_create_request.rb +12 -0
- data/lib/openai/models/realtime/realtime_session_create_response.rb +12 -0
- data/lib/openai/models/responses/tool.rb +5 -2
- data/lib/openai/models/responses_model.rb +2 -0
- data/lib/openai/models/video.rb +122 -0
- data/lib/openai/models/video_create_error.rb +21 -0
- data/lib/openai/models/video_create_params.rb +54 -0
- data/lib/openai/models/video_delete_params.rb +14 -0
- data/lib/openai/models/video_delete_response.rb +35 -0
- data/lib/openai/models/video_download_content_params.rb +34 -0
- data/lib/openai/models/video_list_params.rb +54 -0
- data/lib/openai/models/video_model.rb +15 -0
- data/lib/openai/models/video_remix_params.rb +22 -0
- data/lib/openai/models/video_retrieve_params.rb +14 -0
- data/lib/openai/models/video_seconds.rb +16 -0
- data/lib/openai/models/video_size.rb +17 -0
- data/lib/openai/models.rb +22 -0
- data/lib/openai/resources/beta/chatkit/sessions.rb +71 -0
- data/lib/openai/resources/beta/chatkit/threads.rb +126 -0
- data/lib/openai/resources/beta/chatkit.rb +50 -0
- data/lib/openai/resources/beta.rb +4 -0
- data/lib/openai/resources/videos.rb +165 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +46 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/models/all_models.rbi +10 -0
- data/rbi/openai/models/beta/chatkit/chat_session.rbi +141 -0
- data/rbi/openai/models/beta/chatkit/chat_session_automatic_thread_titling.rbi +35 -0
- data/rbi/openai/models/beta/chatkit/chat_session_chatkit_configuration.rbi +87 -0
- data/rbi/openai/models/beta/chatkit/chat_session_chatkit_configuration_param.rbi +256 -0
- data/rbi/openai/models/beta/chatkit/chat_session_expires_after_param.rbi +43 -0
- data/rbi/openai/models/beta/chatkit/chat_session_file_upload.rbi +61 -0
- data/rbi/openai/models/beta/chatkit/chat_session_history.rbi +52 -0
- data/rbi/openai/models/beta/chatkit/chat_session_rate_limits.rbi +37 -0
- data/rbi/openai/models/beta/chatkit/chat_session_rate_limits_param.rbi +40 -0
- data/rbi/openai/models/beta/chatkit/chat_session_status.rbi +43 -0
- data/rbi/openai/models/beta/chatkit/chat_session_workflow_param.rbi +166 -0
- data/rbi/openai/models/beta/chatkit/chatkit_attachment.rbi +116 -0
- data/rbi/openai/models/beta/chatkit/chatkit_response_output_text.rbi +287 -0
- data/rbi/openai/models/beta/chatkit/chatkit_thread.rbi +220 -0
- data/rbi/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rbi +94 -0
- data/rbi/openai/models/beta/chatkit/chatkit_thread_item_list.rbi +590 -0
- data/rbi/openai/models/beta/chatkit/chatkit_thread_user_message_item.rbi +324 -0
- data/rbi/openai/models/beta/chatkit/chatkit_widget_item.rbi +87 -0
- data/rbi/openai/models/beta/chatkit/session_cancel_params.rbi +34 -0
- data/rbi/openai/models/beta/chatkit/session_create_params.rbi +136 -0
- data/rbi/openai/models/beta/chatkit/thread_delete_params.rbi +34 -0
- data/rbi/openai/models/beta/chatkit/thread_delete_response.rbi +55 -0
- data/rbi/openai/models/beta/chatkit/thread_list_items_params.rbi +138 -0
- data/rbi/openai/models/beta/chatkit/thread_list_params.rbi +145 -0
- data/rbi/openai/models/beta/chatkit/thread_retrieve_params.rbi +34 -0
- data/rbi/openai/models/beta/chatkit_upload_file_params.rbi +50 -0
- data/rbi/openai/models/beta/chatkit_upload_file_response.rbi +25 -0
- data/rbi/openai/models/beta/chatkit_workflow.rbi +134 -0
- data/rbi/openai/models/beta/file_part.rbi +74 -0
- data/rbi/openai/models/beta/image_part.rbi +82 -0
- data/rbi/openai/models/image_edit_params.rbi +6 -3
- data/rbi/openai/models/image_model.rbi +2 -0
- data/rbi/openai/models/realtime/realtime_session.rbi +20 -0
- data/rbi/openai/models/realtime/realtime_session_create_request.rbi +20 -0
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +20 -0
- data/rbi/openai/models/responses/tool.rbi +11 -3
- data/rbi/openai/models/responses_model.rbi +10 -0
- data/rbi/openai/models/video.rbi +143 -0
- data/rbi/openai/models/video_create_error.rbi +26 -0
- data/rbi/openai/models/video_create_params.rbi +87 -0
- data/rbi/openai/models/video_delete_params.rbi +27 -0
- data/rbi/openai/models/video_delete_response.rbi +46 -0
- data/rbi/openai/models/video_download_content_params.rbi +89 -0
- data/rbi/openai/models/video_list_params.rbi +91 -0
- data/rbi/openai/models/video_model.rbi +19 -0
- data/rbi/openai/models/video_remix_params.rbi +40 -0
- data/rbi/openai/models/video_retrieve_params.rbi +27 -0
- data/rbi/openai/models/video_seconds.rbi +20 -0
- data/rbi/openai/models/video_size.rbi +23 -0
- data/rbi/openai/models.rbi +22 -0
- data/rbi/openai/resources/beta/chatkit/sessions.rbi +61 -0
- data/rbi/openai/resources/beta/chatkit/threads.rbi +110 -0
- data/rbi/openai/resources/beta/chatkit.rbi +35 -0
- data/rbi/openai/resources/beta.rbi +3 -0
- data/rbi/openai/resources/images.rbi +4 -2
- data/rbi/openai/resources/videos.rbi +121 -0
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/models/all_models.rbs +4 -0
- data/sig/openai/models/beta/chatkit/chat_session.rbs +69 -0
- data/sig/openai/models/beta/chatkit/chat_session_automatic_thread_titling.rbs +17 -0
- data/sig/openai/models/beta/chatkit/chat_session_chatkit_configuration.rbs +34 -0
- data/sig/openai/models/beta/chatkit/chat_session_chatkit_configuration_param.rbs +103 -0
- data/sig/openai/models/beta/chatkit/chat_session_expires_after_param.rbs +20 -0
- data/sig/openai/models/beta/chatkit/chat_session_file_upload.rbs +30 -0
- data/sig/openai/models/beta/chatkit/chat_session_history.rbs +19 -0
- data/sig/openai/models/beta/chatkit/chat_session_rate_limits.rbs +18 -0
- data/sig/openai/models/beta/chatkit/chat_session_rate_limits_param.rbs +20 -0
- data/sig/openai/models/beta/chatkit/chat_session_status.rbs +19 -0
- data/sig/openai/models/beta/chatkit/chat_session_workflow_param.rbs +69 -0
- data/sig/openai/models/beta/chatkit/chatkit_attachment.rbs +57 -0
- data/sig/openai/models/beta/chatkit/chatkit_response_output_text.rbs +114 -0
- data/sig/openai/models/beta/chatkit/chatkit_thread.rbs +96 -0
- data/sig/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rbs +51 -0
- data/sig/openai/models/beta/chatkit/chatkit_thread_item_list.rbs +276 -0
- data/sig/openai/models/beta/chatkit/chatkit_thread_user_message_item.rbs +127 -0
- data/sig/openai/models/beta/chatkit/chatkit_widget_item.rbs +51 -0
- data/sig/openai/models/beta/chatkit/session_cancel_params.rbs +19 -0
- data/sig/openai/models/beta/chatkit/session_create_params.rbs +62 -0
- data/sig/openai/models/beta/chatkit/thread_delete_params.rbs +19 -0
- data/sig/openai/models/beta/chatkit/thread_delete_response.rbs +30 -0
- data/sig/openai/models/beta/chatkit/thread_list_items_params.rbs +66 -0
- data/sig/openai/models/beta/chatkit/thread_list_params.rbs +73 -0
- data/sig/openai/models/beta/chatkit/thread_retrieve_params.rbs +19 -0
- data/sig/openai/models/beta/chatkit_upload_file_params.rbs +26 -0
- data/sig/openai/models/beta/chatkit_upload_file_response.rbs +14 -0
- data/sig/openai/models/beta/chatkit_workflow.rbs +55 -0
- data/sig/openai/models/beta/file_part.rbs +42 -0
- data/sig/openai/models/beta/image_part.rbs +47 -0
- data/sig/openai/models/image_model.rbs +3 -1
- data/sig/openai/models/realtime/realtime_session.rbs +8 -0
- data/sig/openai/models/realtime/realtime_session_create_request.rbs +8 -0
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +8 -0
- data/sig/openai/models/responses/tool.rbs +2 -1
- data/sig/openai/models/responses_model.rbs +4 -0
- data/sig/openai/models/video.rbs +88 -0
- data/sig/openai/models/video_create_error.rbs +15 -0
- data/sig/openai/models/video_create_params.rbs +58 -0
- data/sig/openai/models/video_delete_params.rbs +14 -0
- data/sig/openai/models/video_delete_response.rbs +22 -0
- data/sig/openai/models/video_download_content_params.rbs +40 -0
- data/sig/openai/models/video_list_params.rbs +55 -0
- data/sig/openai/models/video_model.rbs +14 -0
- data/sig/openai/models/video_remix_params.rbs +23 -0
- data/sig/openai/models/video_retrieve_params.rbs +15 -0
- data/sig/openai/models/video_seconds.rbs +15 -0
- data/sig/openai/models/video_size.rbs +16 -0
- data/sig/openai/models.rbs +22 -0
- data/sig/openai/resources/beta/chatkit/sessions.rbs +25 -0
- data/sig/openai/resources/beta/chatkit/threads.rbs +39 -0
- data/sig/openai/resources/beta/chatkit.rbs +18 -0
- data/sig/openai/resources/beta.rbs +2 -0
- data/sig/openai/resources/videos.rbs +45 -0
- metadata +140 -2
@@ -0,0 +1,590 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
ChatKitThreadItemList = ChatKit::ChatKitThreadItemList
|
7
|
+
|
8
|
+
module ChatKit
|
9
|
+
class ChatKitThreadItemList < OpenAI::Internal::Type::BaseModel
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList,
|
14
|
+
OpenAI::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# A list of items
|
19
|
+
sig do
|
20
|
+
returns(
|
21
|
+
T::Array[
|
22
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::Variants
|
23
|
+
]
|
24
|
+
)
|
25
|
+
end
|
26
|
+
attr_accessor :data
|
27
|
+
|
28
|
+
# The ID of the first item in the list.
|
29
|
+
sig { returns(T.nilable(String)) }
|
30
|
+
attr_accessor :first_id
|
31
|
+
|
32
|
+
# Whether there are more items available.
|
33
|
+
sig { returns(T::Boolean) }
|
34
|
+
attr_accessor :has_more
|
35
|
+
|
36
|
+
# The ID of the last item in the list.
|
37
|
+
sig { returns(T.nilable(String)) }
|
38
|
+
attr_accessor :last_id
|
39
|
+
|
40
|
+
# The type of object returned, must be `list`.
|
41
|
+
sig { returns(Symbol) }
|
42
|
+
attr_accessor :object
|
43
|
+
|
44
|
+
# A paginated list of thread items rendered for the ChatKit API.
|
45
|
+
sig do
|
46
|
+
params(
|
47
|
+
data:
|
48
|
+
T::Array[
|
49
|
+
T.any(
|
50
|
+
OpenAI::Beta::ChatKit::ChatKitThreadUserMessageItem::OrHash,
|
51
|
+
OpenAI::Beta::ChatKit::ChatKitThreadAssistantMessageItem::OrHash,
|
52
|
+
OpenAI::Beta::ChatKit::ChatKitWidgetItem::OrHash,
|
53
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::OrHash,
|
54
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::OrHash,
|
55
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::OrHash
|
56
|
+
)
|
57
|
+
],
|
58
|
+
first_id: T.nilable(String),
|
59
|
+
has_more: T::Boolean,
|
60
|
+
last_id: T.nilable(String),
|
61
|
+
object: Symbol
|
62
|
+
).returns(T.attached_class)
|
63
|
+
end
|
64
|
+
def self.new(
|
65
|
+
# A list of items
|
66
|
+
data:,
|
67
|
+
# The ID of the first item in the list.
|
68
|
+
first_id:,
|
69
|
+
# Whether there are more items available.
|
70
|
+
has_more:,
|
71
|
+
# The ID of the last item in the list.
|
72
|
+
last_id:,
|
73
|
+
# The type of object returned, must be `list`.
|
74
|
+
object: :list
|
75
|
+
)
|
76
|
+
end
|
77
|
+
|
78
|
+
sig do
|
79
|
+
override.returns(
|
80
|
+
{
|
81
|
+
data:
|
82
|
+
T::Array[
|
83
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::Variants
|
84
|
+
],
|
85
|
+
first_id: T.nilable(String),
|
86
|
+
has_more: T::Boolean,
|
87
|
+
last_id: T.nilable(String),
|
88
|
+
object: Symbol
|
89
|
+
}
|
90
|
+
)
|
91
|
+
end
|
92
|
+
def to_hash
|
93
|
+
end
|
94
|
+
|
95
|
+
# User-authored messages within a thread.
|
96
|
+
module Data
|
97
|
+
extend OpenAI::Internal::Type::Union
|
98
|
+
|
99
|
+
Variants =
|
100
|
+
T.type_alias do
|
101
|
+
T.any(
|
102
|
+
OpenAI::Beta::ChatKit::ChatKitThreadUserMessageItem,
|
103
|
+
OpenAI::Beta::ChatKit::ChatKitThreadAssistantMessageItem,
|
104
|
+
OpenAI::Beta::ChatKit::ChatKitWidgetItem,
|
105
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall,
|
106
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask,
|
107
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup
|
108
|
+
)
|
109
|
+
end
|
110
|
+
|
111
|
+
class ChatKitClientToolCall < OpenAI::Internal::Type::BaseModel
|
112
|
+
OrHash =
|
113
|
+
T.type_alias do
|
114
|
+
T.any(
|
115
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall,
|
116
|
+
OpenAI::Internal::AnyHash
|
117
|
+
)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Identifier of the thread item.
|
121
|
+
sig { returns(String) }
|
122
|
+
attr_accessor :id
|
123
|
+
|
124
|
+
# JSON-encoded arguments that were sent to the tool.
|
125
|
+
sig { returns(String) }
|
126
|
+
attr_accessor :arguments
|
127
|
+
|
128
|
+
# Identifier for the client tool call.
|
129
|
+
sig { returns(String) }
|
130
|
+
attr_accessor :call_id
|
131
|
+
|
132
|
+
# Unix timestamp (in seconds) for when the item was created.
|
133
|
+
sig { returns(Integer) }
|
134
|
+
attr_accessor :created_at
|
135
|
+
|
136
|
+
# Tool name that was invoked.
|
137
|
+
sig { returns(String) }
|
138
|
+
attr_accessor :name
|
139
|
+
|
140
|
+
# Type discriminator that is always `chatkit.thread_item`.
|
141
|
+
sig { returns(Symbol) }
|
142
|
+
attr_accessor :object
|
143
|
+
|
144
|
+
# JSON-encoded output captured from the tool. Defaults to null while execution is
|
145
|
+
# in progress.
|
146
|
+
sig { returns(T.nilable(String)) }
|
147
|
+
attr_accessor :output
|
148
|
+
|
149
|
+
# Execution status for the tool call.
|
150
|
+
sig do
|
151
|
+
returns(
|
152
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status::TaggedSymbol
|
153
|
+
)
|
154
|
+
end
|
155
|
+
attr_accessor :status
|
156
|
+
|
157
|
+
# Identifier of the parent thread.
|
158
|
+
sig { returns(String) }
|
159
|
+
attr_accessor :thread_id
|
160
|
+
|
161
|
+
# Type discriminator that is always `chatkit.client_tool_call`.
|
162
|
+
sig { returns(Symbol) }
|
163
|
+
attr_accessor :type
|
164
|
+
|
165
|
+
# Record of a client side tool invocation initiated by the assistant.
|
166
|
+
sig do
|
167
|
+
params(
|
168
|
+
id: String,
|
169
|
+
arguments: String,
|
170
|
+
call_id: String,
|
171
|
+
created_at: Integer,
|
172
|
+
name: String,
|
173
|
+
output: T.nilable(String),
|
174
|
+
status:
|
175
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status::OrSymbol,
|
176
|
+
thread_id: String,
|
177
|
+
object: Symbol,
|
178
|
+
type: Symbol
|
179
|
+
).returns(T.attached_class)
|
180
|
+
end
|
181
|
+
def self.new(
|
182
|
+
# Identifier of the thread item.
|
183
|
+
id:,
|
184
|
+
# JSON-encoded arguments that were sent to the tool.
|
185
|
+
arguments:,
|
186
|
+
# Identifier for the client tool call.
|
187
|
+
call_id:,
|
188
|
+
# Unix timestamp (in seconds) for when the item was created.
|
189
|
+
created_at:,
|
190
|
+
# Tool name that was invoked.
|
191
|
+
name:,
|
192
|
+
# JSON-encoded output captured from the tool. Defaults to null while execution is
|
193
|
+
# in progress.
|
194
|
+
output:,
|
195
|
+
# Execution status for the tool call.
|
196
|
+
status:,
|
197
|
+
# Identifier of the parent thread.
|
198
|
+
thread_id:,
|
199
|
+
# Type discriminator that is always `chatkit.thread_item`.
|
200
|
+
object: :"chatkit.thread_item",
|
201
|
+
# Type discriminator that is always `chatkit.client_tool_call`.
|
202
|
+
type: :"chatkit.client_tool_call"
|
203
|
+
)
|
204
|
+
end
|
205
|
+
|
206
|
+
sig do
|
207
|
+
override.returns(
|
208
|
+
{
|
209
|
+
id: String,
|
210
|
+
arguments: String,
|
211
|
+
call_id: String,
|
212
|
+
created_at: Integer,
|
213
|
+
name: String,
|
214
|
+
object: Symbol,
|
215
|
+
output: T.nilable(String),
|
216
|
+
status:
|
217
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status::TaggedSymbol,
|
218
|
+
thread_id: String,
|
219
|
+
type: Symbol
|
220
|
+
}
|
221
|
+
)
|
222
|
+
end
|
223
|
+
def to_hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Execution status for the tool call.
|
227
|
+
module Status
|
228
|
+
extend OpenAI::Internal::Type::Enum
|
229
|
+
|
230
|
+
TaggedSymbol =
|
231
|
+
T.type_alias do
|
232
|
+
T.all(
|
233
|
+
Symbol,
|
234
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status
|
235
|
+
)
|
236
|
+
end
|
237
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
238
|
+
|
239
|
+
IN_PROGRESS =
|
240
|
+
T.let(
|
241
|
+
:in_progress,
|
242
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status::TaggedSymbol
|
243
|
+
)
|
244
|
+
COMPLETED =
|
245
|
+
T.let(
|
246
|
+
:completed,
|
247
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status::TaggedSymbol
|
248
|
+
)
|
249
|
+
|
250
|
+
sig do
|
251
|
+
override.returns(
|
252
|
+
T::Array[
|
253
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::Status::TaggedSymbol
|
254
|
+
]
|
255
|
+
)
|
256
|
+
end
|
257
|
+
def self.values
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
class ChatKitTask < OpenAI::Internal::Type::BaseModel
|
263
|
+
OrHash =
|
264
|
+
T.type_alias do
|
265
|
+
T.any(
|
266
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask,
|
267
|
+
OpenAI::Internal::AnyHash
|
268
|
+
)
|
269
|
+
end
|
270
|
+
|
271
|
+
# Identifier of the thread item.
|
272
|
+
sig { returns(String) }
|
273
|
+
attr_accessor :id
|
274
|
+
|
275
|
+
# Unix timestamp (in seconds) for when the item was created.
|
276
|
+
sig { returns(Integer) }
|
277
|
+
attr_accessor :created_at
|
278
|
+
|
279
|
+
# Optional heading for the task. Defaults to null when not provided.
|
280
|
+
sig { returns(T.nilable(String)) }
|
281
|
+
attr_accessor :heading
|
282
|
+
|
283
|
+
# Type discriminator that is always `chatkit.thread_item`.
|
284
|
+
sig { returns(Symbol) }
|
285
|
+
attr_accessor :object
|
286
|
+
|
287
|
+
# Optional summary that describes the task. Defaults to null when omitted.
|
288
|
+
sig { returns(T.nilable(String)) }
|
289
|
+
attr_accessor :summary
|
290
|
+
|
291
|
+
# Subtype for the task.
|
292
|
+
sig do
|
293
|
+
returns(
|
294
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType::TaggedSymbol
|
295
|
+
)
|
296
|
+
end
|
297
|
+
attr_accessor :task_type
|
298
|
+
|
299
|
+
# Identifier of the parent thread.
|
300
|
+
sig { returns(String) }
|
301
|
+
attr_accessor :thread_id
|
302
|
+
|
303
|
+
# Type discriminator that is always `chatkit.task`.
|
304
|
+
sig { returns(Symbol) }
|
305
|
+
attr_accessor :type
|
306
|
+
|
307
|
+
# Task emitted by the workflow to show progress and status updates.
|
308
|
+
sig do
|
309
|
+
params(
|
310
|
+
id: String,
|
311
|
+
created_at: Integer,
|
312
|
+
heading: T.nilable(String),
|
313
|
+
summary: T.nilable(String),
|
314
|
+
task_type:
|
315
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType::OrSymbol,
|
316
|
+
thread_id: String,
|
317
|
+
object: Symbol,
|
318
|
+
type: Symbol
|
319
|
+
).returns(T.attached_class)
|
320
|
+
end
|
321
|
+
def self.new(
|
322
|
+
# Identifier of the thread item.
|
323
|
+
id:,
|
324
|
+
# Unix timestamp (in seconds) for when the item was created.
|
325
|
+
created_at:,
|
326
|
+
# Optional heading for the task. Defaults to null when not provided.
|
327
|
+
heading:,
|
328
|
+
# Optional summary that describes the task. Defaults to null when omitted.
|
329
|
+
summary:,
|
330
|
+
# Subtype for the task.
|
331
|
+
task_type:,
|
332
|
+
# Identifier of the parent thread.
|
333
|
+
thread_id:,
|
334
|
+
# Type discriminator that is always `chatkit.thread_item`.
|
335
|
+
object: :"chatkit.thread_item",
|
336
|
+
# Type discriminator that is always `chatkit.task`.
|
337
|
+
type: :"chatkit.task"
|
338
|
+
)
|
339
|
+
end
|
340
|
+
|
341
|
+
sig do
|
342
|
+
override.returns(
|
343
|
+
{
|
344
|
+
id: String,
|
345
|
+
created_at: Integer,
|
346
|
+
heading: T.nilable(String),
|
347
|
+
object: Symbol,
|
348
|
+
summary: T.nilable(String),
|
349
|
+
task_type:
|
350
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType::TaggedSymbol,
|
351
|
+
thread_id: String,
|
352
|
+
type: Symbol
|
353
|
+
}
|
354
|
+
)
|
355
|
+
end
|
356
|
+
def to_hash
|
357
|
+
end
|
358
|
+
|
359
|
+
# Subtype for the task.
|
360
|
+
module TaskType
|
361
|
+
extend OpenAI::Internal::Type::Enum
|
362
|
+
|
363
|
+
TaggedSymbol =
|
364
|
+
T.type_alias do
|
365
|
+
T.all(
|
366
|
+
Symbol,
|
367
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType
|
368
|
+
)
|
369
|
+
end
|
370
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
371
|
+
|
372
|
+
CUSTOM =
|
373
|
+
T.let(
|
374
|
+
:custom,
|
375
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType::TaggedSymbol
|
376
|
+
)
|
377
|
+
THOUGHT =
|
378
|
+
T.let(
|
379
|
+
:thought,
|
380
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType::TaggedSymbol
|
381
|
+
)
|
382
|
+
|
383
|
+
sig do
|
384
|
+
override.returns(
|
385
|
+
T::Array[
|
386
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::TaskType::TaggedSymbol
|
387
|
+
]
|
388
|
+
)
|
389
|
+
end
|
390
|
+
def self.values
|
391
|
+
end
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
class ChatKitTaskGroup < OpenAI::Internal::Type::BaseModel
|
396
|
+
OrHash =
|
397
|
+
T.type_alias do
|
398
|
+
T.any(
|
399
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup,
|
400
|
+
OpenAI::Internal::AnyHash
|
401
|
+
)
|
402
|
+
end
|
403
|
+
|
404
|
+
# Identifier of the thread item.
|
405
|
+
sig { returns(String) }
|
406
|
+
attr_accessor :id
|
407
|
+
|
408
|
+
# Unix timestamp (in seconds) for when the item was created.
|
409
|
+
sig { returns(Integer) }
|
410
|
+
attr_accessor :created_at
|
411
|
+
|
412
|
+
# Type discriminator that is always `chatkit.thread_item`.
|
413
|
+
sig { returns(Symbol) }
|
414
|
+
attr_accessor :object
|
415
|
+
|
416
|
+
# Tasks included in the group.
|
417
|
+
sig do
|
418
|
+
returns(
|
419
|
+
T::Array[
|
420
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task
|
421
|
+
]
|
422
|
+
)
|
423
|
+
end
|
424
|
+
attr_accessor :tasks
|
425
|
+
|
426
|
+
# Identifier of the parent thread.
|
427
|
+
sig { returns(String) }
|
428
|
+
attr_accessor :thread_id
|
429
|
+
|
430
|
+
# Type discriminator that is always `chatkit.task_group`.
|
431
|
+
sig { returns(Symbol) }
|
432
|
+
attr_accessor :type
|
433
|
+
|
434
|
+
# Collection of workflow tasks grouped together in the thread.
|
435
|
+
sig do
|
436
|
+
params(
|
437
|
+
id: String,
|
438
|
+
created_at: Integer,
|
439
|
+
tasks:
|
440
|
+
T::Array[
|
441
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::OrHash
|
442
|
+
],
|
443
|
+
thread_id: String,
|
444
|
+
object: Symbol,
|
445
|
+
type: Symbol
|
446
|
+
).returns(T.attached_class)
|
447
|
+
end
|
448
|
+
def self.new(
|
449
|
+
# Identifier of the thread item.
|
450
|
+
id:,
|
451
|
+
# Unix timestamp (in seconds) for when the item was created.
|
452
|
+
created_at:,
|
453
|
+
# Tasks included in the group.
|
454
|
+
tasks:,
|
455
|
+
# Identifier of the parent thread.
|
456
|
+
thread_id:,
|
457
|
+
# Type discriminator that is always `chatkit.thread_item`.
|
458
|
+
object: :"chatkit.thread_item",
|
459
|
+
# Type discriminator that is always `chatkit.task_group`.
|
460
|
+
type: :"chatkit.task_group"
|
461
|
+
)
|
462
|
+
end
|
463
|
+
|
464
|
+
sig do
|
465
|
+
override.returns(
|
466
|
+
{
|
467
|
+
id: String,
|
468
|
+
created_at: Integer,
|
469
|
+
object: Symbol,
|
470
|
+
tasks:
|
471
|
+
T::Array[
|
472
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task
|
473
|
+
],
|
474
|
+
thread_id: String,
|
475
|
+
type: Symbol
|
476
|
+
}
|
477
|
+
)
|
478
|
+
end
|
479
|
+
def to_hash
|
480
|
+
end
|
481
|
+
|
482
|
+
class Task < OpenAI::Internal::Type::BaseModel
|
483
|
+
OrHash =
|
484
|
+
T.type_alias do
|
485
|
+
T.any(
|
486
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task,
|
487
|
+
OpenAI::Internal::AnyHash
|
488
|
+
)
|
489
|
+
end
|
490
|
+
|
491
|
+
# Optional heading for the grouped task. Defaults to null when not provided.
|
492
|
+
sig { returns(T.nilable(String)) }
|
493
|
+
attr_accessor :heading
|
494
|
+
|
495
|
+
# Optional summary that describes the grouped task. Defaults to null when omitted.
|
496
|
+
sig { returns(T.nilable(String)) }
|
497
|
+
attr_accessor :summary
|
498
|
+
|
499
|
+
# Subtype for the grouped task.
|
500
|
+
sig do
|
501
|
+
returns(
|
502
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::Type::TaggedSymbol
|
503
|
+
)
|
504
|
+
end
|
505
|
+
attr_accessor :type
|
506
|
+
|
507
|
+
# Task entry that appears within a TaskGroup.
|
508
|
+
sig do
|
509
|
+
params(
|
510
|
+
heading: T.nilable(String),
|
511
|
+
summary: T.nilable(String),
|
512
|
+
type:
|
513
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::Type::OrSymbol
|
514
|
+
).returns(T.attached_class)
|
515
|
+
end
|
516
|
+
def self.new(
|
517
|
+
# Optional heading for the grouped task. Defaults to null when not provided.
|
518
|
+
heading:,
|
519
|
+
# Optional summary that describes the grouped task. Defaults to null when omitted.
|
520
|
+
summary:,
|
521
|
+
# Subtype for the grouped task.
|
522
|
+
type:
|
523
|
+
)
|
524
|
+
end
|
525
|
+
|
526
|
+
sig do
|
527
|
+
override.returns(
|
528
|
+
{
|
529
|
+
heading: T.nilable(String),
|
530
|
+
summary: T.nilable(String),
|
531
|
+
type:
|
532
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::Type::TaggedSymbol
|
533
|
+
}
|
534
|
+
)
|
535
|
+
end
|
536
|
+
def to_hash
|
537
|
+
end
|
538
|
+
|
539
|
+
# Subtype for the grouped task.
|
540
|
+
module Type
|
541
|
+
extend OpenAI::Internal::Type::Enum
|
542
|
+
|
543
|
+
TaggedSymbol =
|
544
|
+
T.type_alias do
|
545
|
+
T.all(
|
546
|
+
Symbol,
|
547
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::Type
|
548
|
+
)
|
549
|
+
end
|
550
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
551
|
+
|
552
|
+
CUSTOM =
|
553
|
+
T.let(
|
554
|
+
:custom,
|
555
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::Type::TaggedSymbol
|
556
|
+
)
|
557
|
+
THOUGHT =
|
558
|
+
T.let(
|
559
|
+
:thought,
|
560
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::Type::TaggedSymbol
|
561
|
+
)
|
562
|
+
|
563
|
+
sig do
|
564
|
+
override.returns(
|
565
|
+
T::Array[
|
566
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::Type::TaggedSymbol
|
567
|
+
]
|
568
|
+
)
|
569
|
+
end
|
570
|
+
def self.values
|
571
|
+
end
|
572
|
+
end
|
573
|
+
end
|
574
|
+
end
|
575
|
+
|
576
|
+
sig do
|
577
|
+
override.returns(
|
578
|
+
T::Array[
|
579
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::Variants
|
580
|
+
]
|
581
|
+
)
|
582
|
+
end
|
583
|
+
def self.variants
|
584
|
+
end
|
585
|
+
end
|
586
|
+
end
|
587
|
+
end
|
588
|
+
end
|
589
|
+
end
|
590
|
+
end
|