openai 0.28.1 → 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 +16 -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/call_accept_params.rb +16 -0
- data/lib/openai/models/realtime/call_hangup_params.rb +16 -0
- data/lib/openai/models/realtime/call_refer_params.rb +28 -0
- data/lib/openai/models/realtime/call_reject_params.rb +28 -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/realtime/calls.rb +143 -0
- data/lib/openai/resources/realtime.rb +4 -0
- data/lib/openai/resources/videos.rb +165 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +52 -1
- 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/call_accept_params.rbi +29 -0
- data/rbi/openai/models/realtime/call_hangup_params.rbi +29 -0
- data/rbi/openai/models/realtime/call_refer_params.rbi +44 -0
- data/rbi/openai/models/realtime/call_reject_params.rbi +47 -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/realtime/calls.rbi +182 -0
- data/rbi/openai/resources/realtime.rbi +3 -0
- 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/call_accept_params.rbs +17 -0
- data/sig/openai/models/realtime/call_hangup_params.rbs +17 -0
- data/sig/openai/models/realtime/call_refer_params.rbs +25 -0
- data/sig/openai/models/realtime/call_reject_params.rbs +27 -0
- 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/realtime/calls.rbs +43 -0
- data/sig/openai/resources/realtime.rbs +2 -0
- data/sig/openai/resources/videos.rbs +45 -0
- metadata +155 -2
@@ -0,0 +1,19 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_status = :active | :expired | :cancelled
|
6
|
+
|
7
|
+
module ChatSessionStatus
|
8
|
+
extend OpenAI::Internal::Type::Enum
|
9
|
+
|
10
|
+
ACTIVE: :active
|
11
|
+
EXPIRED: :expired
|
12
|
+
CANCELLED: :cancelled
|
13
|
+
|
14
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::ChatKit::chat_session_status]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_workflow_param =
|
6
|
+
{
|
7
|
+
id: String,
|
8
|
+
state_variables: ::Hash[Symbol, OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam::state_variable],
|
9
|
+
tracing: OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing,
|
10
|
+
version: String
|
11
|
+
}
|
12
|
+
|
13
|
+
class ChatSessionWorkflowParam < OpenAI::Internal::Type::BaseModel
|
14
|
+
attr_accessor id: String
|
15
|
+
|
16
|
+
attr_reader state_variables: ::Hash[Symbol, OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam::state_variable]?
|
17
|
+
|
18
|
+
def state_variables=: (
|
19
|
+
::Hash[Symbol, OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam::state_variable]
|
20
|
+
) -> ::Hash[Symbol, OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam::state_variable]
|
21
|
+
|
22
|
+
attr_reader tracing: OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing?
|
23
|
+
|
24
|
+
def tracing=: (
|
25
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing
|
26
|
+
) -> OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing
|
27
|
+
|
28
|
+
attr_reader version: String?
|
29
|
+
|
30
|
+
def version=: (String) -> String
|
31
|
+
|
32
|
+
def initialize: (
|
33
|
+
id: String,
|
34
|
+
?state_variables: ::Hash[Symbol, OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam::state_variable],
|
35
|
+
?tracing: OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing,
|
36
|
+
?version: String
|
37
|
+
) -> void
|
38
|
+
|
39
|
+
def to_hash: -> {
|
40
|
+
id: String,
|
41
|
+
state_variables: ::Hash[Symbol, OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam::state_variable],
|
42
|
+
tracing: OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing,
|
43
|
+
version: String
|
44
|
+
}
|
45
|
+
|
46
|
+
type state_variable = String | bool | Float
|
47
|
+
|
48
|
+
module StateVariable
|
49
|
+
extend OpenAI::Internal::Type::Union
|
50
|
+
|
51
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::ChatKit::ChatSessionWorkflowParam::state_variable]
|
52
|
+
end
|
53
|
+
|
54
|
+
type tracing = { enabled: bool }
|
55
|
+
|
56
|
+
class Tracing < OpenAI::Internal::Type::BaseModel
|
57
|
+
attr_reader enabled: bool?
|
58
|
+
|
59
|
+
def enabled=: (bool) -> bool
|
60
|
+
|
61
|
+
def initialize: (?enabled: bool) -> void
|
62
|
+
|
63
|
+
def to_hash: -> { enabled: bool }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
class ChatKitAttachment = ChatKit::ChatKitAttachment
|
5
|
+
|
6
|
+
module ChatKit
|
7
|
+
type chatkit_attachment =
|
8
|
+
{
|
9
|
+
id: String,
|
10
|
+
mime_type: String,
|
11
|
+
name: String,
|
12
|
+
preview_url: String?,
|
13
|
+
type: OpenAI::Models::Beta::ChatKit::ChatKitAttachment::type_
|
14
|
+
}
|
15
|
+
|
16
|
+
class ChatKitAttachment < OpenAI::Internal::Type::BaseModel
|
17
|
+
attr_accessor id: String
|
18
|
+
|
19
|
+
attr_accessor mime_type: String
|
20
|
+
|
21
|
+
attr_accessor name: String
|
22
|
+
|
23
|
+
attr_accessor preview_url: String?
|
24
|
+
|
25
|
+
attr_accessor type: OpenAI::Models::Beta::ChatKit::ChatKitAttachment::type_
|
26
|
+
|
27
|
+
def initialize: (
|
28
|
+
id: String,
|
29
|
+
mime_type: String,
|
30
|
+
name: String,
|
31
|
+
preview_url: String?,
|
32
|
+
type: OpenAI::Models::Beta::ChatKit::ChatKitAttachment::type_
|
33
|
+
) -> void
|
34
|
+
|
35
|
+
def to_hash: -> {
|
36
|
+
id: String,
|
37
|
+
mime_type: String,
|
38
|
+
name: String,
|
39
|
+
preview_url: String?,
|
40
|
+
type: OpenAI::Models::Beta::ChatKit::ChatKitAttachment::type_
|
41
|
+
}
|
42
|
+
|
43
|
+
type type_ = :image | :file
|
44
|
+
|
45
|
+
module Type
|
46
|
+
extend OpenAI::Internal::Type::Enum
|
47
|
+
|
48
|
+
IMAGE: :image
|
49
|
+
FILE: :file
|
50
|
+
|
51
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::ChatKit::ChatKitAttachment::type_]
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
class ChatKitResponseOutputText = ChatKit::ChatKitResponseOutputText
|
5
|
+
|
6
|
+
module ChatKit
|
7
|
+
type chatkit_response_output_text =
|
8
|
+
{
|
9
|
+
annotations: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::annotation],
|
10
|
+
text: String,
|
11
|
+
type: :output_text
|
12
|
+
}
|
13
|
+
|
14
|
+
class ChatKitResponseOutputText < OpenAI::Internal::Type::BaseModel
|
15
|
+
attr_accessor annotations: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::annotation]
|
16
|
+
|
17
|
+
attr_accessor text: String
|
18
|
+
|
19
|
+
attr_accessor type: :output_text
|
20
|
+
|
21
|
+
def initialize: (
|
22
|
+
annotations: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::annotation],
|
23
|
+
text: String,
|
24
|
+
?type: :output_text
|
25
|
+
) -> void
|
26
|
+
|
27
|
+
def to_hash: -> {
|
28
|
+
annotations: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::annotation],
|
29
|
+
text: String,
|
30
|
+
type: :output_text
|
31
|
+
}
|
32
|
+
|
33
|
+
type annotation =
|
34
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File
|
35
|
+
| OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL
|
36
|
+
|
37
|
+
module Annotation
|
38
|
+
extend OpenAI::Internal::Type::Union
|
39
|
+
|
40
|
+
type file =
|
41
|
+
{
|
42
|
+
source: OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source,
|
43
|
+
type: :file
|
44
|
+
}
|
45
|
+
|
46
|
+
class File < OpenAI::Internal::Type::BaseModel
|
47
|
+
attr_accessor source: OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source
|
48
|
+
|
49
|
+
attr_accessor type: :file
|
50
|
+
|
51
|
+
def initialize: (
|
52
|
+
source: OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source,
|
53
|
+
?type: :file
|
54
|
+
) -> void
|
55
|
+
|
56
|
+
def to_hash: -> {
|
57
|
+
source: OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source,
|
58
|
+
type: :file
|
59
|
+
}
|
60
|
+
|
61
|
+
type source = { filename: String, type: :file }
|
62
|
+
|
63
|
+
class Source < OpenAI::Internal::Type::BaseModel
|
64
|
+
attr_accessor filename: String
|
65
|
+
|
66
|
+
attr_accessor type: :file
|
67
|
+
|
68
|
+
def initialize: (filename: String, ?type: :file) -> void
|
69
|
+
|
70
|
+
def to_hash: -> { filename: String, type: :file }
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
type url =
|
75
|
+
{
|
76
|
+
source: OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source,
|
77
|
+
type: :url
|
78
|
+
}
|
79
|
+
|
80
|
+
class URL < OpenAI::Internal::Type::BaseModel
|
81
|
+
attr_accessor source: OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source
|
82
|
+
|
83
|
+
attr_accessor type: :url
|
84
|
+
|
85
|
+
def initialize: (
|
86
|
+
source: OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source,
|
87
|
+
?type: :url
|
88
|
+
) -> void
|
89
|
+
|
90
|
+
def to_hash: -> {
|
91
|
+
source: OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source,
|
92
|
+
type: :url
|
93
|
+
}
|
94
|
+
|
95
|
+
type source = { type: :url, url: String }
|
96
|
+
|
97
|
+
class Source < OpenAI::Internal::Type::BaseModel
|
98
|
+
attr_accessor type: :url
|
99
|
+
|
100
|
+
attr_accessor url: String
|
101
|
+
|
102
|
+
def initialize: (url: String, ?type: :url) -> void
|
103
|
+
|
104
|
+
def to_hash: -> { type: :url, url: String }
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::ChatKit::ChatKitResponseOutputText::annotation]
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
class ChatKitThread = ChatKit::ChatKitThread
|
5
|
+
|
6
|
+
module ChatKit
|
7
|
+
type chatkit_thread =
|
8
|
+
{
|
9
|
+
id: String,
|
10
|
+
created_at: Integer,
|
11
|
+
object: :"chatkit.thread",
|
12
|
+
status: OpenAI::Models::Beta::ChatKit::ChatKitThread::status,
|
13
|
+
title: String?,
|
14
|
+
user: String
|
15
|
+
}
|
16
|
+
|
17
|
+
class ChatKitThread < OpenAI::Internal::Type::BaseModel
|
18
|
+
attr_accessor id: String
|
19
|
+
|
20
|
+
attr_accessor created_at: Integer
|
21
|
+
|
22
|
+
attr_accessor object: :"chatkit.thread"
|
23
|
+
|
24
|
+
attr_accessor status: OpenAI::Models::Beta::ChatKit::ChatKitThread::status
|
25
|
+
|
26
|
+
attr_accessor title: String?
|
27
|
+
|
28
|
+
attr_accessor user: String
|
29
|
+
|
30
|
+
def initialize: (
|
31
|
+
id: String,
|
32
|
+
created_at: Integer,
|
33
|
+
status: OpenAI::Models::Beta::ChatKit::ChatKitThread::status,
|
34
|
+
title: String?,
|
35
|
+
user: String,
|
36
|
+
?object: :"chatkit.thread"
|
37
|
+
) -> void
|
38
|
+
|
39
|
+
def to_hash: -> {
|
40
|
+
id: String,
|
41
|
+
created_at: Integer,
|
42
|
+
object: :"chatkit.thread",
|
43
|
+
status: OpenAI::Models::Beta::ChatKit::ChatKitThread::status,
|
44
|
+
title: String?,
|
45
|
+
user: String
|
46
|
+
}
|
47
|
+
|
48
|
+
type status =
|
49
|
+
OpenAI::Beta::ChatKit::ChatKitThread::Status::Active
|
50
|
+
| OpenAI::Beta::ChatKit::ChatKitThread::Status::Locked
|
51
|
+
| OpenAI::Beta::ChatKit::ChatKitThread::Status::Closed
|
52
|
+
|
53
|
+
module Status
|
54
|
+
extend OpenAI::Internal::Type::Union
|
55
|
+
|
56
|
+
type active = { type: :active }
|
57
|
+
|
58
|
+
class Active < OpenAI::Internal::Type::BaseModel
|
59
|
+
attr_accessor type: :active
|
60
|
+
|
61
|
+
def initialize: (?type: :active) -> void
|
62
|
+
|
63
|
+
def to_hash: -> { type: :active }
|
64
|
+
end
|
65
|
+
|
66
|
+
type locked = { reason: String?, type: :locked }
|
67
|
+
|
68
|
+
class Locked < OpenAI::Internal::Type::BaseModel
|
69
|
+
attr_accessor reason: String?
|
70
|
+
|
71
|
+
attr_accessor type: :locked
|
72
|
+
|
73
|
+
def initialize: (reason: String?, ?type: :locked) -> void
|
74
|
+
|
75
|
+
def to_hash: -> { reason: String?, type: :locked }
|
76
|
+
end
|
77
|
+
|
78
|
+
type closed = { reason: String?, type: :closed }
|
79
|
+
|
80
|
+
class Closed < OpenAI::Internal::Type::BaseModel
|
81
|
+
attr_accessor reason: String?
|
82
|
+
|
83
|
+
attr_accessor type: :closed
|
84
|
+
|
85
|
+
def initialize: (reason: String?, ?type: :closed) -> void
|
86
|
+
|
87
|
+
def to_hash: -> { reason: String?, type: :closed }
|
88
|
+
end
|
89
|
+
|
90
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThread::status]
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
class ChatKitThreadAssistantMessageItem = ChatKit::ChatKitThreadAssistantMessageItem
|
5
|
+
|
6
|
+
module ChatKit
|
7
|
+
type chatkit_thread_assistant_message_item =
|
8
|
+
{
|
9
|
+
id: String,
|
10
|
+
content: ::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText],
|
11
|
+
created_at: Integer,
|
12
|
+
object: :"chatkit.thread_item",
|
13
|
+
thread_id: String,
|
14
|
+
type: :"chatkit.assistant_message"
|
15
|
+
}
|
16
|
+
|
17
|
+
class ChatKitThreadAssistantMessageItem < OpenAI::Internal::Type::BaseModel
|
18
|
+
attr_accessor id: String
|
19
|
+
|
20
|
+
attr_accessor content: ::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText]
|
21
|
+
|
22
|
+
attr_accessor created_at: Integer
|
23
|
+
|
24
|
+
attr_accessor object: :"chatkit.thread_item"
|
25
|
+
|
26
|
+
attr_accessor thread_id: String
|
27
|
+
|
28
|
+
attr_accessor type: :"chatkit.assistant_message"
|
29
|
+
|
30
|
+
def initialize: (
|
31
|
+
id: String,
|
32
|
+
content: ::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText],
|
33
|
+
created_at: Integer,
|
34
|
+
thread_id: String,
|
35
|
+
?object: :"chatkit.thread_item",
|
36
|
+
?type: :"chatkit.assistant_message"
|
37
|
+
) -> void
|
38
|
+
|
39
|
+
def to_hash: -> {
|
40
|
+
id: String,
|
41
|
+
content: ::Array[OpenAI::Beta::ChatKit::ChatKitResponseOutputText],
|
42
|
+
created_at: Integer,
|
43
|
+
object: :"chatkit.thread_item",
|
44
|
+
thread_id: String,
|
45
|
+
type: :"chatkit.assistant_message"
|
46
|
+
}
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,276 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
class ChatKitThreadItemList = ChatKit::ChatKitThreadItemList
|
5
|
+
|
6
|
+
module ChatKit
|
7
|
+
type chatkit_thread_item_list =
|
8
|
+
{
|
9
|
+
data: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data],
|
10
|
+
first_id: String?,
|
11
|
+
has_more: bool,
|
12
|
+
last_id: String?,
|
13
|
+
object: :list
|
14
|
+
}
|
15
|
+
|
16
|
+
class ChatKitThreadItemList < OpenAI::Internal::Type::BaseModel
|
17
|
+
attr_accessor data: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data]
|
18
|
+
|
19
|
+
attr_accessor first_id: String?
|
20
|
+
|
21
|
+
attr_accessor has_more: bool
|
22
|
+
|
23
|
+
attr_accessor last_id: String?
|
24
|
+
|
25
|
+
attr_accessor object: :list
|
26
|
+
|
27
|
+
def initialize: (
|
28
|
+
data: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data],
|
29
|
+
first_id: String?,
|
30
|
+
has_more: bool,
|
31
|
+
last_id: String?,
|
32
|
+
?object: :list
|
33
|
+
) -> void
|
34
|
+
|
35
|
+
def to_hash: -> {
|
36
|
+
data: ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data],
|
37
|
+
first_id: String?,
|
38
|
+
has_more: bool,
|
39
|
+
last_id: String?,
|
40
|
+
object: :list
|
41
|
+
}
|
42
|
+
|
43
|
+
type data =
|
44
|
+
OpenAI::Beta::ChatKit::ChatKitThreadUserMessageItem
|
45
|
+
| OpenAI::Beta::ChatKit::ChatKitThreadAssistantMessageItem
|
46
|
+
| OpenAI::Beta::ChatKit::ChatKitWidgetItem
|
47
|
+
| OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall
|
48
|
+
| OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask
|
49
|
+
| OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup
|
50
|
+
|
51
|
+
module Data
|
52
|
+
extend OpenAI::Internal::Type::Union
|
53
|
+
|
54
|
+
type chatkit_client_tool_call =
|
55
|
+
{
|
56
|
+
id: String,
|
57
|
+
arguments: String,
|
58
|
+
call_id: String,
|
59
|
+
created_at: Integer,
|
60
|
+
name: String,
|
61
|
+
object: :"chatkit.thread_item",
|
62
|
+
output: String?,
|
63
|
+
status: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status,
|
64
|
+
thread_id: String,
|
65
|
+
type: :"chatkit.client_tool_call"
|
66
|
+
}
|
67
|
+
|
68
|
+
class ChatKitClientToolCall < OpenAI::Internal::Type::BaseModel
|
69
|
+
attr_accessor id: String
|
70
|
+
|
71
|
+
attr_accessor arguments: String
|
72
|
+
|
73
|
+
attr_accessor call_id: String
|
74
|
+
|
75
|
+
attr_accessor created_at: Integer
|
76
|
+
|
77
|
+
attr_accessor name: String
|
78
|
+
|
79
|
+
attr_accessor object: :"chatkit.thread_item"
|
80
|
+
|
81
|
+
attr_accessor output: String?
|
82
|
+
|
83
|
+
attr_accessor status: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status
|
84
|
+
|
85
|
+
attr_accessor thread_id: String
|
86
|
+
|
87
|
+
attr_accessor type: :"chatkit.client_tool_call"
|
88
|
+
|
89
|
+
def initialize: (
|
90
|
+
id: String,
|
91
|
+
arguments: String,
|
92
|
+
call_id: String,
|
93
|
+
created_at: Integer,
|
94
|
+
name: String,
|
95
|
+
output: String?,
|
96
|
+
status: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status,
|
97
|
+
thread_id: String,
|
98
|
+
?object: :"chatkit.thread_item",
|
99
|
+
?type: :"chatkit.client_tool_call"
|
100
|
+
) -> void
|
101
|
+
|
102
|
+
def to_hash: -> {
|
103
|
+
id: String,
|
104
|
+
arguments: String,
|
105
|
+
call_id: String,
|
106
|
+
created_at: Integer,
|
107
|
+
name: String,
|
108
|
+
object: :"chatkit.thread_item",
|
109
|
+
output: String?,
|
110
|
+
status: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status,
|
111
|
+
thread_id: String,
|
112
|
+
type: :"chatkit.client_tool_call"
|
113
|
+
}
|
114
|
+
|
115
|
+
type status = :in_progress | :completed
|
116
|
+
|
117
|
+
module Status
|
118
|
+
extend OpenAI::Internal::Type::Enum
|
119
|
+
|
120
|
+
IN_PROGRESS: :in_progress
|
121
|
+
COMPLETED: :completed
|
122
|
+
|
123
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitClientToolCall::status]
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
type chatkit_task =
|
128
|
+
{
|
129
|
+
id: String,
|
130
|
+
created_at: Integer,
|
131
|
+
heading: String?,
|
132
|
+
object: :"chatkit.thread_item",
|
133
|
+
summary: String?,
|
134
|
+
task_type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type,
|
135
|
+
thread_id: String,
|
136
|
+
type: :"chatkit.task"
|
137
|
+
}
|
138
|
+
|
139
|
+
class ChatKitTask < OpenAI::Internal::Type::BaseModel
|
140
|
+
attr_accessor id: String
|
141
|
+
|
142
|
+
attr_accessor created_at: Integer
|
143
|
+
|
144
|
+
attr_accessor heading: String?
|
145
|
+
|
146
|
+
attr_accessor object: :"chatkit.thread_item"
|
147
|
+
|
148
|
+
attr_accessor summary: String?
|
149
|
+
|
150
|
+
attr_accessor task_type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type
|
151
|
+
|
152
|
+
attr_accessor thread_id: String
|
153
|
+
|
154
|
+
attr_accessor type: :"chatkit.task"
|
155
|
+
|
156
|
+
def initialize: (
|
157
|
+
id: String,
|
158
|
+
created_at: Integer,
|
159
|
+
heading: String?,
|
160
|
+
summary: String?,
|
161
|
+
task_type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type,
|
162
|
+
thread_id: String,
|
163
|
+
?object: :"chatkit.thread_item",
|
164
|
+
?type: :"chatkit.task"
|
165
|
+
) -> void
|
166
|
+
|
167
|
+
def to_hash: -> {
|
168
|
+
id: String,
|
169
|
+
created_at: Integer,
|
170
|
+
heading: String?,
|
171
|
+
object: :"chatkit.thread_item",
|
172
|
+
summary: String?,
|
173
|
+
task_type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type,
|
174
|
+
thread_id: String,
|
175
|
+
type: :"chatkit.task"
|
176
|
+
}
|
177
|
+
|
178
|
+
type task_type = :custom | :thought
|
179
|
+
|
180
|
+
module TaskType
|
181
|
+
extend OpenAI::Internal::Type::Enum
|
182
|
+
|
183
|
+
CUSTOM: :custom
|
184
|
+
THOUGHT: :thought
|
185
|
+
|
186
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTask::task_type]
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
type chatkit_task_group =
|
191
|
+
{
|
192
|
+
id: String,
|
193
|
+
created_at: Integer,
|
194
|
+
object: :"chatkit.thread_item",
|
195
|
+
tasks: ::Array[OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task],
|
196
|
+
thread_id: String,
|
197
|
+
type: :"chatkit.task_group"
|
198
|
+
}
|
199
|
+
|
200
|
+
class ChatKitTaskGroup < OpenAI::Internal::Type::BaseModel
|
201
|
+
attr_accessor id: String
|
202
|
+
|
203
|
+
attr_accessor created_at: Integer
|
204
|
+
|
205
|
+
attr_accessor object: :"chatkit.thread_item"
|
206
|
+
|
207
|
+
attr_accessor tasks: ::Array[OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task]
|
208
|
+
|
209
|
+
attr_accessor thread_id: String
|
210
|
+
|
211
|
+
attr_accessor type: :"chatkit.task_group"
|
212
|
+
|
213
|
+
def initialize: (
|
214
|
+
id: String,
|
215
|
+
created_at: Integer,
|
216
|
+
tasks: ::Array[OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task],
|
217
|
+
thread_id: String,
|
218
|
+
?object: :"chatkit.thread_item",
|
219
|
+
?type: :"chatkit.task_group"
|
220
|
+
) -> void
|
221
|
+
|
222
|
+
def to_hash: -> {
|
223
|
+
id: String,
|
224
|
+
created_at: Integer,
|
225
|
+
object: :"chatkit.thread_item",
|
226
|
+
tasks: ::Array[OpenAI::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task],
|
227
|
+
thread_id: String,
|
228
|
+
type: :"chatkit.task_group"
|
229
|
+
}
|
230
|
+
|
231
|
+
type task =
|
232
|
+
{
|
233
|
+
heading: String?,
|
234
|
+
summary: String?,
|
235
|
+
type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::type_
|
236
|
+
}
|
237
|
+
|
238
|
+
class Task < OpenAI::Internal::Type::BaseModel
|
239
|
+
attr_accessor heading: String?
|
240
|
+
|
241
|
+
attr_accessor summary: String?
|
242
|
+
|
243
|
+
attr_accessor type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::type_
|
244
|
+
|
245
|
+
def initialize: (
|
246
|
+
heading: String?,
|
247
|
+
summary: String?,
|
248
|
+
type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::type_
|
249
|
+
) -> void
|
250
|
+
|
251
|
+
def to_hash: -> {
|
252
|
+
heading: String?,
|
253
|
+
summary: String?,
|
254
|
+
type: OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::type_
|
255
|
+
}
|
256
|
+
|
257
|
+
type type_ = :custom | :thought
|
258
|
+
|
259
|
+
module Type
|
260
|
+
extend OpenAI::Internal::Type::Enum
|
261
|
+
|
262
|
+
CUSTOM: :custom
|
263
|
+
THOUGHT: :thought
|
264
|
+
|
265
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::Data::ChatKitTaskGroup::Task::type_]
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::ChatKit::ChatKitThreadItemList::data]
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|