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,103 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_chatkit_configuration_param =
|
6
|
+
{
|
7
|
+
automatic_thread_titling: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::AutomaticThreadTitling,
|
8
|
+
file_upload: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::FileUpload,
|
9
|
+
history: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History
|
10
|
+
}
|
11
|
+
|
12
|
+
class ChatSessionChatKitConfigurationParam < OpenAI::Internal::Type::BaseModel
|
13
|
+
attr_reader automatic_thread_titling: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::AutomaticThreadTitling?
|
14
|
+
|
15
|
+
def automatic_thread_titling=: (
|
16
|
+
OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::AutomaticThreadTitling
|
17
|
+
) -> OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::AutomaticThreadTitling
|
18
|
+
|
19
|
+
attr_reader file_upload: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::FileUpload?
|
20
|
+
|
21
|
+
def file_upload=: (
|
22
|
+
OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::FileUpload
|
23
|
+
) -> OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::FileUpload
|
24
|
+
|
25
|
+
attr_reader history: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History?
|
26
|
+
|
27
|
+
def history=: (
|
28
|
+
OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History
|
29
|
+
) -> OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History
|
30
|
+
|
31
|
+
def initialize: (
|
32
|
+
?automatic_thread_titling: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::AutomaticThreadTitling,
|
33
|
+
?file_upload: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::FileUpload,
|
34
|
+
?history: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History
|
35
|
+
) -> void
|
36
|
+
|
37
|
+
def to_hash: -> {
|
38
|
+
automatic_thread_titling: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::AutomaticThreadTitling,
|
39
|
+
file_upload: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::FileUpload,
|
40
|
+
history: OpenAI::Beta::ChatKit::ChatSessionChatKitConfigurationParam::History
|
41
|
+
}
|
42
|
+
|
43
|
+
type automatic_thread_titling = { enabled: bool }
|
44
|
+
|
45
|
+
class AutomaticThreadTitling < OpenAI::Internal::Type::BaseModel
|
46
|
+
attr_reader enabled: bool?
|
47
|
+
|
48
|
+
def enabled=: (bool) -> bool
|
49
|
+
|
50
|
+
def initialize: (?enabled: bool) -> void
|
51
|
+
|
52
|
+
def to_hash: -> { enabled: bool }
|
53
|
+
end
|
54
|
+
|
55
|
+
type file_upload =
|
56
|
+
{ enabled: bool, max_file_size: Integer, max_files: Integer }
|
57
|
+
|
58
|
+
class FileUpload < OpenAI::Internal::Type::BaseModel
|
59
|
+
attr_reader enabled: bool?
|
60
|
+
|
61
|
+
def enabled=: (bool) -> bool
|
62
|
+
|
63
|
+
attr_reader max_file_size: Integer?
|
64
|
+
|
65
|
+
def max_file_size=: (Integer) -> Integer
|
66
|
+
|
67
|
+
attr_reader max_files: Integer?
|
68
|
+
|
69
|
+
def max_files=: (Integer) -> Integer
|
70
|
+
|
71
|
+
def initialize: (
|
72
|
+
?enabled: bool,
|
73
|
+
?max_file_size: Integer,
|
74
|
+
?max_files: Integer
|
75
|
+
) -> void
|
76
|
+
|
77
|
+
def to_hash: -> {
|
78
|
+
enabled: bool,
|
79
|
+
max_file_size: Integer,
|
80
|
+
max_files: Integer
|
81
|
+
}
|
82
|
+
end
|
83
|
+
|
84
|
+
type history = { enabled: bool, recent_threads: Integer }
|
85
|
+
|
86
|
+
class History < OpenAI::Internal::Type::BaseModel
|
87
|
+
attr_reader enabled: bool?
|
88
|
+
|
89
|
+
def enabled=: (bool) -> bool
|
90
|
+
|
91
|
+
attr_reader recent_threads: Integer?
|
92
|
+
|
93
|
+
def recent_threads=: (Integer) -> Integer
|
94
|
+
|
95
|
+
def initialize: (?enabled: bool, ?recent_threads: Integer) -> void
|
96
|
+
|
97
|
+
def to_hash: -> { enabled: bool, recent_threads: Integer }
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_expires_after_param =
|
6
|
+
{ anchor: :created_at, seconds: Integer }
|
7
|
+
|
8
|
+
class ChatSessionExpiresAfterParam < OpenAI::Internal::Type::BaseModel
|
9
|
+
attr_accessor anchor: :created_at
|
10
|
+
|
11
|
+
attr_accessor seconds: Integer
|
12
|
+
|
13
|
+
def initialize: (seconds: Integer, ?anchor: :created_at) -> void
|
14
|
+
|
15
|
+
def to_hash: -> { anchor: :created_at, seconds: Integer }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_file_upload =
|
6
|
+
{ enabled: bool, max_file_size: Integer?, max_files: Integer? }
|
7
|
+
|
8
|
+
class ChatSessionFileUpload < OpenAI::Internal::Type::BaseModel
|
9
|
+
attr_accessor enabled: bool
|
10
|
+
|
11
|
+
attr_accessor max_file_size: Integer?
|
12
|
+
|
13
|
+
attr_accessor max_files: Integer?
|
14
|
+
|
15
|
+
def initialize: (
|
16
|
+
enabled: bool,
|
17
|
+
max_file_size: Integer?,
|
18
|
+
max_files: Integer?
|
19
|
+
) -> void
|
20
|
+
|
21
|
+
def to_hash: -> {
|
22
|
+
enabled: bool,
|
23
|
+
max_file_size: Integer?,
|
24
|
+
max_files: Integer?
|
25
|
+
}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_history = { enabled: bool, recent_threads: Integer? }
|
6
|
+
|
7
|
+
class ChatSessionHistory < OpenAI::Internal::Type::BaseModel
|
8
|
+
attr_accessor enabled: bool
|
9
|
+
|
10
|
+
attr_accessor recent_threads: Integer?
|
11
|
+
|
12
|
+
def initialize: (enabled: bool, recent_threads: Integer?) -> void
|
13
|
+
|
14
|
+
def to_hash: -> { enabled: bool, recent_threads: Integer? }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_rate_limits =
|
6
|
+
{ :max_requests_per_1_minute => Integer }
|
7
|
+
|
8
|
+
class ChatSessionRateLimits < OpenAI::Internal::Type::BaseModel
|
9
|
+
attr_accessor max_requests_per_1_minute: Integer
|
10
|
+
|
11
|
+
def initialize: (max_requests_per_1_minute: Integer) -> void
|
12
|
+
|
13
|
+
def to_hash: -> { :max_requests_per_1_minute => Integer }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module OpenAI
|
2
|
+
module Models
|
3
|
+
module Beta
|
4
|
+
module ChatKit
|
5
|
+
type chat_session_rate_limits_param =
|
6
|
+
{ :max_requests_per_1_minute => Integer }
|
7
|
+
|
8
|
+
class ChatSessionRateLimitsParam < OpenAI::Internal::Type::BaseModel
|
9
|
+
attr_reader max_requests_per_1_minute: Integer?
|
10
|
+
|
11
|
+
def max_requests_per_1_minute=: (Integer) -> Integer
|
12
|
+
|
13
|
+
def initialize: (?max_requests_per_1_minute: Integer) -> void
|
14
|
+
|
15
|
+
def to_hash: -> { :max_requests_per_1_minute => Integer }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -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
|