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,37 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
module ChatKit
|
7
|
+
class ChatSessionRateLimits < OpenAI::Internal::Type::BaseModel
|
8
|
+
OrHash =
|
9
|
+
T.type_alias do
|
10
|
+
T.any(
|
11
|
+
OpenAI::Beta::ChatKit::ChatSessionRateLimits,
|
12
|
+
OpenAI::Internal::AnyHash
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
# Maximum allowed requests per one-minute window.
|
17
|
+
sig { returns(Integer) }
|
18
|
+
attr_accessor :max_requests_per_1_minute
|
19
|
+
|
20
|
+
# Active per-minute request limit for the session.
|
21
|
+
sig do
|
22
|
+
params(max_requests_per_1_minute: Integer).returns(T.attached_class)
|
23
|
+
end
|
24
|
+
def self.new(
|
25
|
+
# Maximum allowed requests per one-minute window.
|
26
|
+
max_requests_per_1_minute:
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
sig { override.returns({ max_requests_per_1_minute: Integer }) }
|
31
|
+
def to_hash
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
module ChatKit
|
7
|
+
class ChatSessionRateLimitsParam < OpenAI::Internal::Type::BaseModel
|
8
|
+
OrHash =
|
9
|
+
T.type_alias do
|
10
|
+
T.any(
|
11
|
+
OpenAI::Beta::ChatKit::ChatSessionRateLimitsParam,
|
12
|
+
OpenAI::Internal::AnyHash
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
# Maximum number of requests allowed per minute for the session. Defaults to 10.
|
17
|
+
sig { returns(T.nilable(Integer)) }
|
18
|
+
attr_reader :max_requests_per_1_minute
|
19
|
+
|
20
|
+
sig { params(max_requests_per_1_minute: Integer).void }
|
21
|
+
attr_writer :max_requests_per_1_minute
|
22
|
+
|
23
|
+
# Controls request rate limits for the session.
|
24
|
+
sig do
|
25
|
+
params(max_requests_per_1_minute: Integer).returns(T.attached_class)
|
26
|
+
end
|
27
|
+
def self.new(
|
28
|
+
# Maximum number of requests allowed per minute for the session. Defaults to 10.
|
29
|
+
max_requests_per_1_minute: nil
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
sig { override.returns({ max_requests_per_1_minute: Integer }) }
|
34
|
+
def to_hash
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
module ChatKit
|
7
|
+
module ChatSessionStatus
|
8
|
+
extend OpenAI::Internal::Type::Enum
|
9
|
+
|
10
|
+
TaggedSymbol =
|
11
|
+
T.type_alias do
|
12
|
+
T.all(Symbol, OpenAI::Beta::ChatKit::ChatSessionStatus)
|
13
|
+
end
|
14
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
15
|
+
|
16
|
+
ACTIVE =
|
17
|
+
T.let(
|
18
|
+
:active,
|
19
|
+
OpenAI::Beta::ChatKit::ChatSessionStatus::TaggedSymbol
|
20
|
+
)
|
21
|
+
EXPIRED =
|
22
|
+
T.let(
|
23
|
+
:expired,
|
24
|
+
OpenAI::Beta::ChatKit::ChatSessionStatus::TaggedSymbol
|
25
|
+
)
|
26
|
+
CANCELLED =
|
27
|
+
T.let(
|
28
|
+
:cancelled,
|
29
|
+
OpenAI::Beta::ChatKit::ChatSessionStatus::TaggedSymbol
|
30
|
+
)
|
31
|
+
|
32
|
+
sig do
|
33
|
+
override.returns(
|
34
|
+
T::Array[OpenAI::Beta::ChatKit::ChatSessionStatus::TaggedSymbol]
|
35
|
+
)
|
36
|
+
end
|
37
|
+
def self.values
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,166 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
module ChatKit
|
7
|
+
class ChatSessionWorkflowParam < OpenAI::Internal::Type::BaseModel
|
8
|
+
OrHash =
|
9
|
+
T.type_alias do
|
10
|
+
T.any(
|
11
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam,
|
12
|
+
OpenAI::Internal::AnyHash
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
# Identifier for the workflow invoked by the session.
|
17
|
+
sig { returns(String) }
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
# State variables forwarded to the workflow. Keys may be up to 64 characters,
|
21
|
+
# values must be primitive types, and the map defaults to an empty object.
|
22
|
+
sig do
|
23
|
+
returns(
|
24
|
+
T.nilable(
|
25
|
+
T::Hash[
|
26
|
+
Symbol,
|
27
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::StateVariable::Variants
|
28
|
+
]
|
29
|
+
)
|
30
|
+
)
|
31
|
+
end
|
32
|
+
attr_reader :state_variables
|
33
|
+
|
34
|
+
sig do
|
35
|
+
params(
|
36
|
+
state_variables:
|
37
|
+
T::Hash[
|
38
|
+
Symbol,
|
39
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::StateVariable::Variants
|
40
|
+
]
|
41
|
+
).void
|
42
|
+
end
|
43
|
+
attr_writer :state_variables
|
44
|
+
|
45
|
+
# Optional tracing overrides for the workflow invocation. When omitted, tracing is
|
46
|
+
# enabled by default.
|
47
|
+
sig do
|
48
|
+
returns(
|
49
|
+
T.nilable(
|
50
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing
|
51
|
+
)
|
52
|
+
)
|
53
|
+
end
|
54
|
+
attr_reader :tracing
|
55
|
+
|
56
|
+
sig do
|
57
|
+
params(
|
58
|
+
tracing:
|
59
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing::OrHash
|
60
|
+
).void
|
61
|
+
end
|
62
|
+
attr_writer :tracing
|
63
|
+
|
64
|
+
# Specific workflow version to run. Defaults to the latest deployed version.
|
65
|
+
sig { returns(T.nilable(String)) }
|
66
|
+
attr_reader :version
|
67
|
+
|
68
|
+
sig { params(version: String).void }
|
69
|
+
attr_writer :version
|
70
|
+
|
71
|
+
# Workflow reference and overrides applied to the chat session.
|
72
|
+
sig do
|
73
|
+
params(
|
74
|
+
id: String,
|
75
|
+
state_variables:
|
76
|
+
T::Hash[
|
77
|
+
Symbol,
|
78
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::StateVariable::Variants
|
79
|
+
],
|
80
|
+
tracing:
|
81
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing::OrHash,
|
82
|
+
version: String
|
83
|
+
).returns(T.attached_class)
|
84
|
+
end
|
85
|
+
def self.new(
|
86
|
+
# Identifier for the workflow invoked by the session.
|
87
|
+
id:,
|
88
|
+
# State variables forwarded to the workflow. Keys may be up to 64 characters,
|
89
|
+
# values must be primitive types, and the map defaults to an empty object.
|
90
|
+
state_variables: nil,
|
91
|
+
# Optional tracing overrides for the workflow invocation. When omitted, tracing is
|
92
|
+
# enabled by default.
|
93
|
+
tracing: nil,
|
94
|
+
# Specific workflow version to run. Defaults to the latest deployed version.
|
95
|
+
version: nil
|
96
|
+
)
|
97
|
+
end
|
98
|
+
|
99
|
+
sig do
|
100
|
+
override.returns(
|
101
|
+
{
|
102
|
+
id: String,
|
103
|
+
state_variables:
|
104
|
+
T::Hash[
|
105
|
+
Symbol,
|
106
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::StateVariable::Variants
|
107
|
+
],
|
108
|
+
tracing:
|
109
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing,
|
110
|
+
version: String
|
111
|
+
}
|
112
|
+
)
|
113
|
+
end
|
114
|
+
def to_hash
|
115
|
+
end
|
116
|
+
|
117
|
+
module StateVariable
|
118
|
+
extend OpenAI::Internal::Type::Union
|
119
|
+
|
120
|
+
Variants = T.type_alias { T.any(String, T::Boolean, Float) }
|
121
|
+
|
122
|
+
sig do
|
123
|
+
override.returns(
|
124
|
+
T::Array[
|
125
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::StateVariable::Variants
|
126
|
+
]
|
127
|
+
)
|
128
|
+
end
|
129
|
+
def self.variants
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
class Tracing < OpenAI::Internal::Type::BaseModel
|
134
|
+
OrHash =
|
135
|
+
T.type_alias do
|
136
|
+
T.any(
|
137
|
+
OpenAI::Beta::ChatKit::ChatSessionWorkflowParam::Tracing,
|
138
|
+
OpenAI::Internal::AnyHash
|
139
|
+
)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Whether tracing is enabled during the session. Defaults to true.
|
143
|
+
sig { returns(T.nilable(T::Boolean)) }
|
144
|
+
attr_reader :enabled
|
145
|
+
|
146
|
+
sig { params(enabled: T::Boolean).void }
|
147
|
+
attr_writer :enabled
|
148
|
+
|
149
|
+
# Optional tracing overrides for the workflow invocation. When omitted, tracing is
|
150
|
+
# enabled by default.
|
151
|
+
sig { params(enabled: T::Boolean).returns(T.attached_class) }
|
152
|
+
def self.new(
|
153
|
+
# Whether tracing is enabled during the session. Defaults to true.
|
154
|
+
enabled: nil
|
155
|
+
)
|
156
|
+
end
|
157
|
+
|
158
|
+
sig { override.returns({ enabled: T::Boolean }) }
|
159
|
+
def to_hash
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
@@ -0,0 +1,116 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
ChatKitAttachment = ChatKit::ChatKitAttachment
|
7
|
+
|
8
|
+
module ChatKit
|
9
|
+
class ChatKitAttachment < OpenAI::Internal::Type::BaseModel
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
OpenAI::Beta::ChatKit::ChatKitAttachment,
|
14
|
+
OpenAI::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Identifier for the attachment.
|
19
|
+
sig { returns(String) }
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
# MIME type of the attachment.
|
23
|
+
sig { returns(String) }
|
24
|
+
attr_accessor :mime_type
|
25
|
+
|
26
|
+
# Original display name for the attachment.
|
27
|
+
sig { returns(String) }
|
28
|
+
attr_accessor :name
|
29
|
+
|
30
|
+
# Preview URL for rendering the attachment inline.
|
31
|
+
sig { returns(T.nilable(String)) }
|
32
|
+
attr_accessor :preview_url
|
33
|
+
|
34
|
+
# Attachment discriminator.
|
35
|
+
sig do
|
36
|
+
returns(
|
37
|
+
OpenAI::Beta::ChatKit::ChatKitAttachment::Type::TaggedSymbol
|
38
|
+
)
|
39
|
+
end
|
40
|
+
attr_accessor :type
|
41
|
+
|
42
|
+
# Attachment metadata included on thread items.
|
43
|
+
sig do
|
44
|
+
params(
|
45
|
+
id: String,
|
46
|
+
mime_type: String,
|
47
|
+
name: String,
|
48
|
+
preview_url: T.nilable(String),
|
49
|
+
type: OpenAI::Beta::ChatKit::ChatKitAttachment::Type::OrSymbol
|
50
|
+
).returns(T.attached_class)
|
51
|
+
end
|
52
|
+
def self.new(
|
53
|
+
# Identifier for the attachment.
|
54
|
+
id:,
|
55
|
+
# MIME type of the attachment.
|
56
|
+
mime_type:,
|
57
|
+
# Original display name for the attachment.
|
58
|
+
name:,
|
59
|
+
# Preview URL for rendering the attachment inline.
|
60
|
+
preview_url:,
|
61
|
+
# Attachment discriminator.
|
62
|
+
type:
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
66
|
+
sig do
|
67
|
+
override.returns(
|
68
|
+
{
|
69
|
+
id: String,
|
70
|
+
mime_type: String,
|
71
|
+
name: String,
|
72
|
+
preview_url: T.nilable(String),
|
73
|
+
type:
|
74
|
+
OpenAI::Beta::ChatKit::ChatKitAttachment::Type::TaggedSymbol
|
75
|
+
}
|
76
|
+
)
|
77
|
+
end
|
78
|
+
def to_hash
|
79
|
+
end
|
80
|
+
|
81
|
+
# Attachment discriminator.
|
82
|
+
module Type
|
83
|
+
extend OpenAI::Internal::Type::Enum
|
84
|
+
|
85
|
+
TaggedSymbol =
|
86
|
+
T.type_alias do
|
87
|
+
T.all(Symbol, OpenAI::Beta::ChatKit::ChatKitAttachment::Type)
|
88
|
+
end
|
89
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
90
|
+
|
91
|
+
IMAGE =
|
92
|
+
T.let(
|
93
|
+
:image,
|
94
|
+
OpenAI::Beta::ChatKit::ChatKitAttachment::Type::TaggedSymbol
|
95
|
+
)
|
96
|
+
FILE =
|
97
|
+
T.let(
|
98
|
+
:file,
|
99
|
+
OpenAI::Beta::ChatKit::ChatKitAttachment::Type::TaggedSymbol
|
100
|
+
)
|
101
|
+
|
102
|
+
sig do
|
103
|
+
override.returns(
|
104
|
+
T::Array[
|
105
|
+
OpenAI::Beta::ChatKit::ChatKitAttachment::Type::TaggedSymbol
|
106
|
+
]
|
107
|
+
)
|
108
|
+
end
|
109
|
+
def self.values
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -0,0 +1,287 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Beta
|
6
|
+
ChatKitResponseOutputText = ChatKit::ChatKitResponseOutputText
|
7
|
+
|
8
|
+
module ChatKit
|
9
|
+
class ChatKitResponseOutputText < OpenAI::Internal::Type::BaseModel
|
10
|
+
OrHash =
|
11
|
+
T.type_alias do
|
12
|
+
T.any(
|
13
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText,
|
14
|
+
OpenAI::Internal::AnyHash
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Ordered list of annotations attached to the response text.
|
19
|
+
sig do
|
20
|
+
returns(
|
21
|
+
T::Array[
|
22
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::Variants
|
23
|
+
]
|
24
|
+
)
|
25
|
+
end
|
26
|
+
attr_accessor :annotations
|
27
|
+
|
28
|
+
# Assistant generated text.
|
29
|
+
sig { returns(String) }
|
30
|
+
attr_accessor :text
|
31
|
+
|
32
|
+
# Type discriminator that is always `output_text`.
|
33
|
+
sig { returns(Symbol) }
|
34
|
+
attr_accessor :type
|
35
|
+
|
36
|
+
# Assistant response text accompanied by optional annotations.
|
37
|
+
sig do
|
38
|
+
params(
|
39
|
+
annotations:
|
40
|
+
T::Array[
|
41
|
+
T.any(
|
42
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::OrHash,
|
43
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::OrHash
|
44
|
+
)
|
45
|
+
],
|
46
|
+
text: String,
|
47
|
+
type: Symbol
|
48
|
+
).returns(T.attached_class)
|
49
|
+
end
|
50
|
+
def self.new(
|
51
|
+
# Ordered list of annotations attached to the response text.
|
52
|
+
annotations:,
|
53
|
+
# Assistant generated text.
|
54
|
+
text:,
|
55
|
+
# Type discriminator that is always `output_text`.
|
56
|
+
type: :output_text
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
60
|
+
sig do
|
61
|
+
override.returns(
|
62
|
+
{
|
63
|
+
annotations:
|
64
|
+
T::Array[
|
65
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::Variants
|
66
|
+
],
|
67
|
+
text: String,
|
68
|
+
type: Symbol
|
69
|
+
}
|
70
|
+
)
|
71
|
+
end
|
72
|
+
def to_hash
|
73
|
+
end
|
74
|
+
|
75
|
+
# Annotation object describing a cited source.
|
76
|
+
module Annotation
|
77
|
+
extend OpenAI::Internal::Type::Union
|
78
|
+
|
79
|
+
Variants =
|
80
|
+
T.type_alias do
|
81
|
+
T.any(
|
82
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File,
|
83
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
class File < OpenAI::Internal::Type::BaseModel
|
88
|
+
OrHash =
|
89
|
+
T.type_alias do
|
90
|
+
T.any(
|
91
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File,
|
92
|
+
OpenAI::Internal::AnyHash
|
93
|
+
)
|
94
|
+
end
|
95
|
+
|
96
|
+
# File attachment referenced by the annotation.
|
97
|
+
sig do
|
98
|
+
returns(
|
99
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source
|
100
|
+
)
|
101
|
+
end
|
102
|
+
attr_reader :source
|
103
|
+
|
104
|
+
sig do
|
105
|
+
params(
|
106
|
+
source:
|
107
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source::OrHash
|
108
|
+
).void
|
109
|
+
end
|
110
|
+
attr_writer :source
|
111
|
+
|
112
|
+
# Type discriminator that is always `file` for this annotation.
|
113
|
+
sig { returns(Symbol) }
|
114
|
+
attr_accessor :type
|
115
|
+
|
116
|
+
# Annotation that references an uploaded file.
|
117
|
+
sig do
|
118
|
+
params(
|
119
|
+
source:
|
120
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source::OrHash,
|
121
|
+
type: Symbol
|
122
|
+
).returns(T.attached_class)
|
123
|
+
end
|
124
|
+
def self.new(
|
125
|
+
# File attachment referenced by the annotation.
|
126
|
+
source:,
|
127
|
+
# Type discriminator that is always `file` for this annotation.
|
128
|
+
type: :file
|
129
|
+
)
|
130
|
+
end
|
131
|
+
|
132
|
+
sig do
|
133
|
+
override.returns(
|
134
|
+
{
|
135
|
+
source:
|
136
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source,
|
137
|
+
type: Symbol
|
138
|
+
}
|
139
|
+
)
|
140
|
+
end
|
141
|
+
def to_hash
|
142
|
+
end
|
143
|
+
|
144
|
+
class Source < OpenAI::Internal::Type::BaseModel
|
145
|
+
OrHash =
|
146
|
+
T.type_alias do
|
147
|
+
T.any(
|
148
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::File::Source,
|
149
|
+
OpenAI::Internal::AnyHash
|
150
|
+
)
|
151
|
+
end
|
152
|
+
|
153
|
+
# Filename referenced by the annotation.
|
154
|
+
sig { returns(String) }
|
155
|
+
attr_accessor :filename
|
156
|
+
|
157
|
+
# Type discriminator that is always `file`.
|
158
|
+
sig { returns(Symbol) }
|
159
|
+
attr_accessor :type
|
160
|
+
|
161
|
+
# File attachment referenced by the annotation.
|
162
|
+
sig do
|
163
|
+
params(filename: String, type: Symbol).returns(
|
164
|
+
T.attached_class
|
165
|
+
)
|
166
|
+
end
|
167
|
+
def self.new(
|
168
|
+
# Filename referenced by the annotation.
|
169
|
+
filename:,
|
170
|
+
# Type discriminator that is always `file`.
|
171
|
+
type: :file
|
172
|
+
)
|
173
|
+
end
|
174
|
+
|
175
|
+
sig { override.returns({ filename: String, type: Symbol }) }
|
176
|
+
def to_hash
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
class URL < OpenAI::Internal::Type::BaseModel
|
182
|
+
OrHash =
|
183
|
+
T.type_alias do
|
184
|
+
T.any(
|
185
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL,
|
186
|
+
OpenAI::Internal::AnyHash
|
187
|
+
)
|
188
|
+
end
|
189
|
+
|
190
|
+
# URL referenced by the annotation.
|
191
|
+
sig do
|
192
|
+
returns(
|
193
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source
|
194
|
+
)
|
195
|
+
end
|
196
|
+
attr_reader :source
|
197
|
+
|
198
|
+
sig do
|
199
|
+
params(
|
200
|
+
source:
|
201
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source::OrHash
|
202
|
+
).void
|
203
|
+
end
|
204
|
+
attr_writer :source
|
205
|
+
|
206
|
+
# Type discriminator that is always `url` for this annotation.
|
207
|
+
sig { returns(Symbol) }
|
208
|
+
attr_accessor :type
|
209
|
+
|
210
|
+
# Annotation that references a URL.
|
211
|
+
sig do
|
212
|
+
params(
|
213
|
+
source:
|
214
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source::OrHash,
|
215
|
+
type: Symbol
|
216
|
+
).returns(T.attached_class)
|
217
|
+
end
|
218
|
+
def self.new(
|
219
|
+
# URL referenced by the annotation.
|
220
|
+
source:,
|
221
|
+
# Type discriminator that is always `url` for this annotation.
|
222
|
+
type: :url
|
223
|
+
)
|
224
|
+
end
|
225
|
+
|
226
|
+
sig do
|
227
|
+
override.returns(
|
228
|
+
{
|
229
|
+
source:
|
230
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source,
|
231
|
+
type: Symbol
|
232
|
+
}
|
233
|
+
)
|
234
|
+
end
|
235
|
+
def to_hash
|
236
|
+
end
|
237
|
+
|
238
|
+
class Source < OpenAI::Internal::Type::BaseModel
|
239
|
+
OrHash =
|
240
|
+
T.type_alias do
|
241
|
+
T.any(
|
242
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::URL::Source,
|
243
|
+
OpenAI::Internal::AnyHash
|
244
|
+
)
|
245
|
+
end
|
246
|
+
|
247
|
+
# Type discriminator that is always `url`.
|
248
|
+
sig { returns(Symbol) }
|
249
|
+
attr_accessor :type
|
250
|
+
|
251
|
+
# URL referenced by the annotation.
|
252
|
+
sig { returns(String) }
|
253
|
+
attr_accessor :url
|
254
|
+
|
255
|
+
# URL referenced by the annotation.
|
256
|
+
sig do
|
257
|
+
params(url: String, type: Symbol).returns(T.attached_class)
|
258
|
+
end
|
259
|
+
def self.new(
|
260
|
+
# URL referenced by the annotation.
|
261
|
+
url:,
|
262
|
+
# Type discriminator that is always `url`.
|
263
|
+
type: :url
|
264
|
+
)
|
265
|
+
end
|
266
|
+
|
267
|
+
sig { override.returns({ type: Symbol, url: String }) }
|
268
|
+
def to_hash
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
sig do
|
274
|
+
override.returns(
|
275
|
+
T::Array[
|
276
|
+
OpenAI::Beta::ChatKit::ChatKitResponseOutputText::Annotation::Variants
|
277
|
+
]
|
278
|
+
)
|
279
|
+
end
|
280
|
+
def self.variants
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|