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,19 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module VideoModel
|
6
|
+
extend OpenAI::Internal::Type::Enum
|
7
|
+
|
8
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::VideoModel) }
|
9
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
10
|
+
|
11
|
+
SORA_2 = T.let(:"sora-2", OpenAI::VideoModel::TaggedSymbol)
|
12
|
+
SORA_2_PRO = T.let(:"sora-2-pro", OpenAI::VideoModel::TaggedSymbol)
|
13
|
+
|
14
|
+
sig { override.returns(T::Array[OpenAI::VideoModel::TaggedSymbol]) }
|
15
|
+
def self.values
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
class VideoRemixParams < OpenAI::Internal::Type::BaseModel
|
6
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
7
|
+
include OpenAI::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
OrHash =
|
10
|
+
T.type_alias do
|
11
|
+
T.any(OpenAI::VideoRemixParams, OpenAI::Internal::AnyHash)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Updated text prompt that directs the remix generation.
|
15
|
+
sig { returns(String) }
|
16
|
+
attr_accessor :prompt
|
17
|
+
|
18
|
+
sig do
|
19
|
+
params(
|
20
|
+
prompt: String,
|
21
|
+
request_options: OpenAI::RequestOptions::OrHash
|
22
|
+
).returns(T.attached_class)
|
23
|
+
end
|
24
|
+
def self.new(
|
25
|
+
# Updated text prompt that directs the remix generation.
|
26
|
+
prompt:,
|
27
|
+
request_options: {}
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
sig do
|
32
|
+
override.returns(
|
33
|
+
{ prompt: String, request_options: OpenAI::RequestOptions }
|
34
|
+
)
|
35
|
+
end
|
36
|
+
def to_hash
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
class VideoRetrieveParams < OpenAI::Internal::Type::BaseModel
|
6
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
7
|
+
include OpenAI::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
OrHash =
|
10
|
+
T.type_alias do
|
11
|
+
T.any(OpenAI::VideoRetrieveParams, OpenAI::Internal::AnyHash)
|
12
|
+
end
|
13
|
+
|
14
|
+
sig do
|
15
|
+
params(request_options: OpenAI::RequestOptions::OrHash).returns(
|
16
|
+
T.attached_class
|
17
|
+
)
|
18
|
+
end
|
19
|
+
def self.new(request_options: {})
|
20
|
+
end
|
21
|
+
|
22
|
+
sig { override.returns({ request_options: OpenAI::RequestOptions }) }
|
23
|
+
def to_hash
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module VideoSeconds
|
6
|
+
extend OpenAI::Internal::Type::Enum
|
7
|
+
|
8
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::VideoSeconds) }
|
9
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
10
|
+
|
11
|
+
VIDEO_SECONDS_4 = T.let(:"4", OpenAI::VideoSeconds::TaggedSymbol)
|
12
|
+
VIDEO_SECONDS_8 = T.let(:"8", OpenAI::VideoSeconds::TaggedSymbol)
|
13
|
+
VIDEO_SECONDS_12 = T.let(:"12", OpenAI::VideoSeconds::TaggedSymbol)
|
14
|
+
|
15
|
+
sig { override.returns(T::Array[OpenAI::VideoSeconds::TaggedSymbol]) }
|
16
|
+
def self.values
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module VideoSize
|
6
|
+
extend OpenAI::Internal::Type::Enum
|
7
|
+
|
8
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::VideoSize) }
|
9
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
10
|
+
|
11
|
+
VIDEO_SIZE_720X1280 = T.let(:"720x1280", OpenAI::VideoSize::TaggedSymbol)
|
12
|
+
VIDEO_SIZE_1280X720 = T.let(:"1280x720", OpenAI::VideoSize::TaggedSymbol)
|
13
|
+
VIDEO_SIZE_1024X1792 =
|
14
|
+
T.let(:"1024x1792", OpenAI::VideoSize::TaggedSymbol)
|
15
|
+
VIDEO_SIZE_1792X1024 =
|
16
|
+
T.let(:"1792x1024", OpenAI::VideoSize::TaggedSymbol)
|
17
|
+
|
18
|
+
sig { override.returns(T::Array[OpenAI::VideoSize::TaggedSymbol]) }
|
19
|
+
def self.values
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/rbi/openai/models.rbi
CHANGED
@@ -224,5 +224,27 @@ module OpenAI
|
|
224
224
|
|
225
225
|
VectorStoreUpdateParams = OpenAI::Models::VectorStoreUpdateParams
|
226
226
|
|
227
|
+
Video = OpenAI::Models::Video
|
228
|
+
|
229
|
+
VideoCreateError = OpenAI::Models::VideoCreateError
|
230
|
+
|
231
|
+
VideoCreateParams = OpenAI::Models::VideoCreateParams
|
232
|
+
|
233
|
+
VideoDeleteParams = OpenAI::Models::VideoDeleteParams
|
234
|
+
|
235
|
+
VideoDownloadContentParams = OpenAI::Models::VideoDownloadContentParams
|
236
|
+
|
237
|
+
VideoListParams = OpenAI::Models::VideoListParams
|
238
|
+
|
239
|
+
VideoModel = OpenAI::Models::VideoModel
|
240
|
+
|
241
|
+
VideoRemixParams = OpenAI::Models::VideoRemixParams
|
242
|
+
|
243
|
+
VideoRetrieveParams = OpenAI::Models::VideoRetrieveParams
|
244
|
+
|
245
|
+
VideoSeconds = OpenAI::Models::VideoSeconds
|
246
|
+
|
247
|
+
VideoSize = OpenAI::Models::VideoSize
|
248
|
+
|
227
249
|
Webhooks = OpenAI::Models::Webhooks
|
228
250
|
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Resources
|
5
|
+
class Beta
|
6
|
+
class ChatKit
|
7
|
+
class Sessions
|
8
|
+
# Create a ChatKit session
|
9
|
+
sig do
|
10
|
+
params(
|
11
|
+
user: String,
|
12
|
+
workflow: OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::OrHash,
|
13
|
+
chatkit_configuration:
|
14
|
+
OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::OrHash,
|
15
|
+
expires_after:
|
16
|
+
OpenAI::Beta::ChatKit::ChatSessionExpiresAfterParam::OrHash,
|
17
|
+
rate_limits:
|
18
|
+
OpenAI::Beta::ChatKit::ChatSessionRateLimitsParam::OrHash,
|
19
|
+
request_options: OpenAI::RequestOptions::OrHash
|
20
|
+
).returns(OpenAI::Beta::ChatKit::ChatSession)
|
21
|
+
end
|
22
|
+
def create(
|
23
|
+
# A free-form string that identifies your end user; ensures this Session can
|
24
|
+
# access other objects that have the same `user` scope.
|
25
|
+
user:,
|
26
|
+
# Workflow that powers the session.
|
27
|
+
workflow:,
|
28
|
+
# Optional overrides for ChatKit runtime configuration features
|
29
|
+
chatkit_configuration: nil,
|
30
|
+
# Optional override for session expiration timing in seconds from creation.
|
31
|
+
# Defaults to 10 minutes.
|
32
|
+
expires_after: nil,
|
33
|
+
# Optional override for per-minute request limits. When omitted, defaults to 10.
|
34
|
+
rate_limits: nil,
|
35
|
+
request_options: {}
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Cancel a ChatKit session
|
40
|
+
sig do
|
41
|
+
params(
|
42
|
+
session_id: String,
|
43
|
+
request_options: OpenAI::RequestOptions::OrHash
|
44
|
+
).returns(OpenAI::Beta::ChatKit::ChatSession)
|
45
|
+
end
|
46
|
+
def cancel(
|
47
|
+
# Unique identifier for the ChatKit session to cancel.
|
48
|
+
session_id,
|
49
|
+
request_options: {}
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
# @api private
|
54
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
55
|
+
def self.new(client:)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Resources
|
5
|
+
class Beta
|
6
|
+
class ChatKit
|
7
|
+
class Threads
|
8
|
+
# Retrieve a ChatKit thread
|
9
|
+
sig do
|
10
|
+
params(
|
11
|
+
thread_id: String,
|
12
|
+
request_options: OpenAI::RequestOptions::OrHash
|
13
|
+
).returns(OpenAI::Beta::ChatKit::ChatKitThread)
|
14
|
+
end
|
15
|
+
def retrieve(
|
16
|
+
# Identifier of the ChatKit thread to retrieve.
|
17
|
+
thread_id,
|
18
|
+
request_options: {}
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
# List ChatKit threads
|
23
|
+
sig do
|
24
|
+
params(
|
25
|
+
after: String,
|
26
|
+
before: String,
|
27
|
+
limit: Integer,
|
28
|
+
order: OpenAI::Beta::ChatKit::ThreadListParams::Order::OrSymbol,
|
29
|
+
user: String,
|
30
|
+
request_options: OpenAI::RequestOptions::OrHash
|
31
|
+
).returns(
|
32
|
+
OpenAI::Internal::ConversationCursorPage[
|
33
|
+
OpenAI::Beta::ChatKit::ChatKitThread
|
34
|
+
]
|
35
|
+
)
|
36
|
+
end
|
37
|
+
def list(
|
38
|
+
# List items created after this thread item ID. Defaults to null for the first
|
39
|
+
# page.
|
40
|
+
after: nil,
|
41
|
+
# List items created before this thread item ID. Defaults to null for the newest
|
42
|
+
# results.
|
43
|
+
before: nil,
|
44
|
+
# Maximum number of thread items to return. Defaults to 20.
|
45
|
+
limit: nil,
|
46
|
+
# Sort order for results by creation time. Defaults to `desc`.
|
47
|
+
order: nil,
|
48
|
+
# Filter threads that belong to this user identifier. Defaults to null to return
|
49
|
+
# all users.
|
50
|
+
user: nil,
|
51
|
+
request_options: {}
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Delete a ChatKit thread
|
56
|
+
sig do
|
57
|
+
params(
|
58
|
+
thread_id: String,
|
59
|
+
request_options: OpenAI::RequestOptions::OrHash
|
60
|
+
).returns(OpenAI::Models::Beta::ChatKit::ThreadDeleteResponse)
|
61
|
+
end
|
62
|
+
def delete(
|
63
|
+
# Identifier of the ChatKit thread to delete.
|
64
|
+
thread_id,
|
65
|
+
request_options: {}
|
66
|
+
)
|
67
|
+
end
|
68
|
+
|
69
|
+
# List ChatKit thread items
|
70
|
+
sig do
|
71
|
+
params(
|
72
|
+
thread_id: String,
|
73
|
+
after: String,
|
74
|
+
before: String,
|
75
|
+
limit: Integer,
|
76
|
+
order:
|
77
|
+
OpenAI::Beta::ChatKit::ThreadListItemsParams::Order::OrSymbol,
|
78
|
+
request_options: OpenAI::RequestOptions::OrHash
|
79
|
+
).returns(
|
80
|
+
OpenAI::Internal::ConversationCursorPage[
|
81
|
+
OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::Variants
|
82
|
+
]
|
83
|
+
)
|
84
|
+
end
|
85
|
+
def list_items(
|
86
|
+
# Identifier of the ChatKit thread whose items are requested.
|
87
|
+
thread_id,
|
88
|
+
# List items created after this thread item ID. Defaults to null for the first
|
89
|
+
# page.
|
90
|
+
after: nil,
|
91
|
+
# List items created before this thread item ID. Defaults to null for the newest
|
92
|
+
# results.
|
93
|
+
before: nil,
|
94
|
+
# Maximum number of thread items to return. Defaults to 20.
|
95
|
+
limit: nil,
|
96
|
+
# Sort order for results by creation time. Defaults to `desc`.
|
97
|
+
order: nil,
|
98
|
+
request_options: {}
|
99
|
+
)
|
100
|
+
end
|
101
|
+
|
102
|
+
# @api private
|
103
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
104
|
+
def self.new(client:)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Resources
|
5
|
+
class Beta
|
6
|
+
class ChatKit
|
7
|
+
sig { returns(OpenAI::Resources::Beta::ChatKit::Sessions) }
|
8
|
+
attr_reader :sessions
|
9
|
+
|
10
|
+
sig { returns(OpenAI::Resources::Beta::ChatKit::Threads) }
|
11
|
+
attr_reader :threads
|
12
|
+
|
13
|
+
# Upload a ChatKit file
|
14
|
+
sig do
|
15
|
+
params(
|
16
|
+
file: OpenAI::Internal::FileInput,
|
17
|
+
request_options: OpenAI::RequestOptions::OrHash
|
18
|
+
).returns(OpenAI::Models::Beta::ChatKitUploadFileResponse::Variants)
|
19
|
+
end
|
20
|
+
def upload_file(
|
21
|
+
# Binary file contents to store with the ChatKit session. Supports PDFs and PNG,
|
22
|
+
# JPG, JPEG, GIF, or WEBP images.
|
23
|
+
file:,
|
24
|
+
request_options: {}
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
# @api private
|
29
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
30
|
+
def self.new(client:)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -91,7 +91,8 @@ module OpenAI
|
|
91
91
|
background: nil,
|
92
92
|
# Control how much effort the model will exert to match the style and features,
|
93
93
|
# especially facial features, of input images. This parameter is only supported
|
94
|
-
# for `gpt-image-1`. Supports `high` and
|
94
|
+
# for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
|
95
|
+
# `low`. Defaults to `low`.
|
95
96
|
input_fidelity: nil,
|
96
97
|
# An additional image whose fully transparent areas (e.g. where alpha is zero)
|
97
98
|
# indicate where `image` should be edited. If there are multiple images provided,
|
@@ -194,7 +195,8 @@ module OpenAI
|
|
194
195
|
background: nil,
|
195
196
|
# Control how much effort the model will exert to match the style and features,
|
196
197
|
# especially facial features, of input images. This parameter is only supported
|
197
|
-
# for `gpt-image-1`. Supports `high` and
|
198
|
+
# for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
|
199
|
+
# `low`. Defaults to `low`.
|
198
200
|
input_fidelity: nil,
|
199
201
|
# An additional image whose fully transparent areas (e.g. where alpha is zero)
|
200
202
|
# indicate where `image` should be edited. If there are multiple images provided,
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Resources
|
5
|
+
class Videos
|
6
|
+
# Create a video
|
7
|
+
sig do
|
8
|
+
params(
|
9
|
+
prompt: String,
|
10
|
+
input_reference: OpenAI::Internal::FileInput,
|
11
|
+
model: OpenAI::VideoModel::OrSymbol,
|
12
|
+
seconds: OpenAI::VideoSeconds::OrSymbol,
|
13
|
+
size: OpenAI::VideoSize::OrSymbol,
|
14
|
+
request_options: OpenAI::RequestOptions::OrHash
|
15
|
+
).returns(OpenAI::Video)
|
16
|
+
end
|
17
|
+
def create(
|
18
|
+
# Text prompt that describes the video to generate.
|
19
|
+
prompt:,
|
20
|
+
# Optional image reference that guides generation.
|
21
|
+
input_reference: nil,
|
22
|
+
# The video generation model to use. Defaults to `sora-2`.
|
23
|
+
model: nil,
|
24
|
+
# Clip duration in seconds. Defaults to 4 seconds.
|
25
|
+
seconds: nil,
|
26
|
+
# Output resolution formatted as width x height. Defaults to 720x1280.
|
27
|
+
size: nil,
|
28
|
+
request_options: {}
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Retrieve a video
|
33
|
+
sig do
|
34
|
+
params(
|
35
|
+
video_id: String,
|
36
|
+
request_options: OpenAI::RequestOptions::OrHash
|
37
|
+
).returns(OpenAI::Video)
|
38
|
+
end
|
39
|
+
def retrieve(
|
40
|
+
# The identifier of the video to retrieve.
|
41
|
+
video_id,
|
42
|
+
request_options: {}
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
# List videos
|
47
|
+
sig do
|
48
|
+
params(
|
49
|
+
after: String,
|
50
|
+
limit: Integer,
|
51
|
+
order: OpenAI::VideoListParams::Order::OrSymbol,
|
52
|
+
request_options: OpenAI::RequestOptions::OrHash
|
53
|
+
).returns(OpenAI::Internal::ConversationCursorPage[OpenAI::Video])
|
54
|
+
end
|
55
|
+
def list(
|
56
|
+
# Identifier for the last item from the previous pagination request
|
57
|
+
after: nil,
|
58
|
+
# Number of items to retrieve
|
59
|
+
limit: nil,
|
60
|
+
# Sort order of results by timestamp. Use `asc` for ascending order or `desc` for
|
61
|
+
# descending order.
|
62
|
+
order: nil,
|
63
|
+
request_options: {}
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Delete a video
|
68
|
+
sig do
|
69
|
+
params(
|
70
|
+
video_id: String,
|
71
|
+
request_options: OpenAI::RequestOptions::OrHash
|
72
|
+
).returns(OpenAI::Models::VideoDeleteResponse)
|
73
|
+
end
|
74
|
+
def delete(
|
75
|
+
# The identifier of the video to delete.
|
76
|
+
video_id,
|
77
|
+
request_options: {}
|
78
|
+
)
|
79
|
+
end
|
80
|
+
|
81
|
+
# Download video content
|
82
|
+
sig do
|
83
|
+
params(
|
84
|
+
video_id: String,
|
85
|
+
variant: OpenAI::VideoDownloadContentParams::Variant::OrSymbol,
|
86
|
+
request_options: OpenAI::RequestOptions::OrHash
|
87
|
+
).returns(StringIO)
|
88
|
+
end
|
89
|
+
def download_content(
|
90
|
+
# The identifier of the video whose media to download.
|
91
|
+
video_id,
|
92
|
+
# Which downloadable asset to return. Defaults to the MP4 video.
|
93
|
+
variant: nil,
|
94
|
+
request_options: {}
|
95
|
+
)
|
96
|
+
end
|
97
|
+
|
98
|
+
# Create a video remix
|
99
|
+
sig do
|
100
|
+
params(
|
101
|
+
video_id: String,
|
102
|
+
prompt: String,
|
103
|
+
request_options: OpenAI::RequestOptions::OrHash
|
104
|
+
).returns(OpenAI::Video)
|
105
|
+
end
|
106
|
+
def remix(
|
107
|
+
# The identifier of the completed video to remix.
|
108
|
+
video_id,
|
109
|
+
# Updated text prompt that directs the remix generation.
|
110
|
+
prompt:,
|
111
|
+
request_options: {}
|
112
|
+
)
|
113
|
+
end
|
114
|
+
|
115
|
+
# @api private
|
116
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
117
|
+
def self.new(client:)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
data/sig/openai/client.rbs
CHANGED
@@ -20,6 +20,8 @@ module OpenAI
|
|
20
20
|
| :"computer-use-preview"
|
21
21
|
| :"computer-use-preview-2025-03-11"
|
22
22
|
| :"gpt-5-codex"
|
23
|
+
| :"gpt-5-pro"
|
24
|
+
| :"gpt-5-pro-2025-10-06"
|
23
25
|
|
24
26
|
module ResponsesOnlyModel
|
25
27
|
extend OpenAI::Internal::Type::Enum
|
@@ -35,6 +37,8 @@ module OpenAI
|
|
35
37
|
COMPUTER_USE_PREVIEW: :"computer-use-preview"
|
36
38
|
COMPUTER_USE_PREVIEW_2025_03_11: :"computer-use-preview-2025-03-11"
|
37
39
|
GPT_5_CODEX: :"gpt-5-codex"
|
40
|
+
GPT_5_PRO: :"gpt-5-pro"
|
41
|
+
GPT_5_PRO_2025_10_06: :"gpt-5-pro-2025-10-06"
|
38
42
|
|
39
43
|
def self?.values: -> ::Array[OpenAI::Models::AllModels::responses_only_model]
|
40
44
|
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session =
|
6
|
+
{
|
7
|
+
id: String,
|
8
|
+
chatkit_configuration: OpenAI::Beta::ChatKit::ChatSessionChatKitConfiguration,
|
9
|
+
client_secret: String,
|
10
|
+
expires_at: Integer,
|
11
|
+
:max_requests_per_1_minute => Integer,
|
12
|
+
object: :"chatkit.session",
|
13
|
+
rate_limits: OpenAI::Beta::ChatKit::ChatSessionRateLimits,
|
14
|
+
status: OpenAI::Models::Beta::ChatKit::chat_session_status,
|
15
|
+
user: String,
|
16
|
+
workflow: OpenAI::Beta::ChatKitWorkflow
|
17
|
+
}
|
18
|
+
|
19
|
+
class ChatSession < OpenAI::Internal::Type::BaseModel
|
20
|
+
attr_accessor id: String
|
21
|
+
|
22
|
+
attr_accessor chatkit_configuration: OpenAI::Beta::ChatKit::ChatSessionChatKitConfiguration
|
23
|
+
|
24
|
+
attr_accessor client_secret: String
|
25
|
+
|
26
|
+
attr_accessor expires_at: Integer
|
27
|
+
|
28
|
+
attr_accessor max_requests_per_1_minute: Integer
|
29
|
+
|
30
|
+
attr_accessor object: :"chatkit.session"
|
31
|
+
|
32
|
+
attr_accessor rate_limits: OpenAI::Beta::ChatKit::ChatSessionRateLimits
|
33
|
+
|
34
|
+
attr_accessor status: OpenAI::Models::Beta::ChatKit::chat_session_status
|
35
|
+
|
36
|
+
attr_accessor user: String
|
37
|
+
|
38
|
+
attr_accessor workflow: OpenAI::Beta::ChatKitWorkflow
|
39
|
+
|
40
|
+
def initialize: (
|
41
|
+
id: String,
|
42
|
+
chatkit_configuration: OpenAI::Beta::ChatKit::ChatSessionChatKitConfiguration,
|
43
|
+
client_secret: String,
|
44
|
+
expires_at: Integer,
|
45
|
+
max_requests_per_1_minute: Integer,
|
46
|
+
rate_limits: OpenAI::Beta::ChatKit::ChatSessionRateLimits,
|
47
|
+
status: OpenAI::Models::Beta::ChatKit::chat_session_status,
|
48
|
+
user: String,
|
49
|
+
workflow: OpenAI::Beta::ChatKitWorkflow,
|
50
|
+
?object: :"chatkit.session"
|
51
|
+
) -> void
|
52
|
+
|
53
|
+
def to_hash: -> {
|
54
|
+
id: String,
|
55
|
+
chatkit_configuration: OpenAI::Beta::ChatKit::ChatSessionChatKitConfiguration,
|
56
|
+
client_secret: String,
|
57
|
+
expires_at: Integer,
|
58
|
+
:max_requests_per_1_minute => Integer,
|
59
|
+
object: :"chatkit.session",
|
60
|
+
rate_limits: OpenAI::Beta::ChatKit::ChatSessionRateLimits,
|
61
|
+
status: OpenAI::Models::Beta::ChatKit::chat_session_status,
|
62
|
+
user: String,
|
63
|
+
workflow: OpenAI::Beta::ChatKitWorkflow
|
64
|
+
}
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_automatic_thread_titling = { enabled: bool }
|
6
|
+
|
7
|
+
class ChatSessionAutomaticThreadTitling < OpenAI::Internal::Type::BaseModel
|
8
|
+
attr_accessor enabled: bool
|
9
|
+
|
10
|
+
def initialize: (enabled: bool) -> void
|
11
|
+
|
12
|
+
def to_hash: -> { enabled: bool }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_chatkit_configuration =
|
6
|
+
{
|
7
|
+
automatic_thread_titling: OpenAI::Beta::ChatKit::ChatSessionAutomaticThreadTitling,
|
8
|
+
file_upload: OpenAI::Beta::ChatKit::ChatSessionFileUpload,
|
9
|
+
history: OpenAI::Beta::ChatKit::ChatSessionHistory
|
10
|
+
}
|
11
|
+
|
12
|
+
class ChatSessionChatKitConfiguration < OpenAI::Internal::Type::BaseModel
|
13
|
+
attr_accessor automatic_thread_titling: OpenAI::Beta::ChatKit::ChatSessionAutomaticThreadTitling
|
14
|
+
|
15
|
+
attr_accessor file_upload: OpenAI::Beta::ChatKit::ChatSessionFileUpload
|
16
|
+
|
17
|
+
attr_accessor history: OpenAI::Beta::ChatKit::ChatSessionHistory
|
18
|
+
|
19
|
+
def initialize: (
|
20
|
+
automatic_thread_titling: OpenAI::Beta::ChatKit::ChatSessionAutomaticThreadTitling,
|
21
|
+
file_upload: OpenAI::Beta::ChatKit::ChatSessionFileUpload,
|
22
|
+
history: OpenAI::Beta::ChatKit::ChatSessionHistory
|
23
|
+
) -> void
|
24
|
+
|
25
|
+
def to_hash: -> {
|
26
|
+
automatic_thread_titling: OpenAI::Beta::ChatKit::ChatSessionAutomaticThreadTitling,
|
27
|
+
file_upload: OpenAI::Beta::ChatKit::ChatSessionFileUpload,
|
28
|
+
history: OpenAI::Beta::ChatKit::ChatSessionHistory
|
29
|
+
}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|