openai 0.52.0 → 0.54.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 +25 -0
- data/README.md +1 -1
- data/lib/openai/models/evals/run_cancel_response.rb +2 -2
- data/lib/openai/models/evals/run_create_params.rb +2 -2
- data/lib/openai/models/evals/run_create_response.rb +2 -2
- data/lib/openai/models/evals/run_list_response.rb +2 -2
- data/lib/openai/models/evals/run_retrieve_response.rb +2 -2
- data/lib/openai/models/image_input_reference_param.rb +23 -0
- data/lib/openai/models/responses/computer_tool.rb +5 -45
- data/lib/openai/models/responses/computer_use_preview_tool.rb +61 -0
- data/lib/openai/models/responses/input_token_count_params.rb +2 -2
- data/lib/openai/models/responses/response.rb +2 -2
- data/lib/openai/models/responses/response_create_params.rb +2 -2
- data/lib/openai/models/responses/response_input_file.rb +1 -24
- data/lib/openai/models/responses/response_input_file_content.rb +1 -27
- data/lib/openai/models/responses/response_tool_search_output_item.rb +2 -2
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +2 -2
- data/lib/openai/models/responses/responses_client_event.rb +2 -2
- data/lib/openai/models/responses/tool.rb +3 -3
- data/lib/openai/models/video_create_character_params.rb +30 -0
- data/lib/openai/models/video_create_character_response.rb +33 -0
- data/lib/openai/models/video_create_params.rb +17 -4
- data/lib/openai/models/video_edit_params.rb +57 -0
- data/lib/openai/models/video_extend_params.rb +69 -0
- data/lib/openai/models/video_get_character_params.rb +20 -0
- data/lib/openai/models/video_get_character_response.rb +33 -0
- data/lib/openai/models.rb +10 -0
- data/lib/openai/resources/responses/input_tokens.rb +1 -1
- data/lib/openai/resources/responses.rb +2 -2
- data/lib/openai/resources/videos.rb +102 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +8 -1
- data/rbi/openai/client.rbi +6 -0
- data/rbi/openai/models/evals/run_cancel_response.rbi +2 -2
- data/rbi/openai/models/evals/run_create_params.rbi +4 -4
- data/rbi/openai/models/evals/run_create_response.rbi +2 -2
- data/rbi/openai/models/evals/run_list_response.rbi +2 -2
- data/rbi/openai/models/evals/run_retrieve_response.rbi +2 -2
- data/rbi/openai/models/image_input_reference_param.rbi +39 -0
- data/rbi/openai/models/responses/computer_tool.rbi +5 -87
- data/rbi/openai/models/responses/computer_use_preview_tool.rbi +124 -0
- data/rbi/openai/models/responses/input_token_count_params.rbi +3 -3
- data/rbi/openai/models/responses/response.rbi +1 -1
- data/rbi/openai/models/responses/response_create_params.rbi +4 -4
- data/rbi/openai/models/responses/response_input_file.rbi +0 -54
- data/rbi/openai/models/responses/response_input_file_content.rbi +0 -59
- data/rbi/openai/models/responses/response_tool_search_output_item.rbi +1 -1
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +3 -3
- data/rbi/openai/models/responses/responses_client_event.rbi +4 -4
- data/rbi/openai/models/responses/tool.rbi +1 -1
- data/rbi/openai/models/video_create_character_params.rbi +51 -0
- data/rbi/openai/models/video_create_character_response.rbi +56 -0
- data/rbi/openai/models/video_create_params.rbi +44 -6
- data/rbi/openai/models/video_edit_params.rbi +111 -0
- data/rbi/openai/models/video_extend_params.rbi +121 -0
- data/rbi/openai/models/video_get_character_params.rbi +35 -0
- data/rbi/openai/models/video_get_character_response.rbi +56 -0
- data/rbi/openai/models.rbi +10 -0
- data/rbi/openai/resources/responses/input_tokens.rbi +1 -1
- data/rbi/openai/resources/responses.rbi +2 -2
- data/rbi/openai/resources/videos.rbi +84 -2
- data/sig/openai/client.rbs +3 -0
- data/sig/openai/models/image_input_reference_param.rbs +19 -0
- data/sig/openai/models/responses/computer_tool.rbs +4 -40
- data/sig/openai/models/responses/computer_use_preview_tool.rbs +51 -0
- data/sig/openai/models/responses/response_input_file.rbs +0 -20
- data/sig/openai/models/responses/response_input_file_content.rbs +0 -20
- data/sig/openai/models/responses/tool.rbs +1 -1
- data/sig/openai/models/video_create_character_params.rbs +28 -0
- data/sig/openai/models/video_create_character_response.rbs +18 -0
- data/sig/openai/models/video_create_params.rbs +15 -6
- data/sig/openai/models/video_edit_params.rbs +48 -0
- data/sig/openai/models/video_extend_params.rbs +56 -0
- data/sig/openai/models/video_get_character_params.rbs +23 -0
- data/sig/openai/models/video_get_character_response.rbs +18 -0
- data/sig/openai/models.rbs +10 -0
- data/sig/openai/resources/videos.rbs +25 -1
- metadata +26 -5
- data/lib/openai/models/responses/computer_use_tool.rb +0 -21
- data/rbi/openai/models/responses/computer_use_tool.rbi +0 -31
- data/sig/openai/models/responses/computer_use_tool.rbs +0 -15
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class ImageInputReferenceParam < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(OpenAI::ImageInputReferenceParam, OpenAI::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(T.nilable(String)) }
|
|
12
|
+
attr_reader :file_id
|
|
13
|
+
|
|
14
|
+
sig { params(file_id: String).void }
|
|
15
|
+
attr_writer :file_id
|
|
16
|
+
|
|
17
|
+
# A fully qualified URL or base64-encoded data URL.
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :image_url
|
|
20
|
+
|
|
21
|
+
sig { params(image_url: String).void }
|
|
22
|
+
attr_writer :image_url
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(file_id: String, image_url: String).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(
|
|
28
|
+
file_id: nil,
|
|
29
|
+
# A fully qualified URL or base64-encoded data URL.
|
|
30
|
+
image_url: nil
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig { override.returns({ file_id: String, image_url: String }) }
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -9,104 +9,22 @@ module OpenAI
|
|
|
9
9
|
T.any(OpenAI::Responses::ComputerTool, OpenAI::Internal::AnyHash)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
# The
|
|
13
|
-
sig { returns(Integer) }
|
|
14
|
-
attr_accessor :display_height
|
|
15
|
-
|
|
16
|
-
# The width of the computer display.
|
|
17
|
-
sig { returns(Integer) }
|
|
18
|
-
attr_accessor :display_width
|
|
19
|
-
|
|
20
|
-
# The type of computer environment to control.
|
|
21
|
-
sig { returns(OpenAI::Responses::ComputerTool::Environment::OrSymbol) }
|
|
22
|
-
attr_accessor :environment
|
|
23
|
-
|
|
24
|
-
# The type of the computer use tool. Always `computer_use_preview`.
|
|
12
|
+
# The type of the computer tool. Always `computer`.
|
|
25
13
|
sig { returns(Symbol) }
|
|
26
14
|
attr_accessor :type
|
|
27
15
|
|
|
28
16
|
# A tool that controls a virtual computer. Learn more about the
|
|
29
17
|
# [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
|
|
30
|
-
sig
|
|
31
|
-
params(
|
|
32
|
-
display_height: Integer,
|
|
33
|
-
display_width: Integer,
|
|
34
|
-
environment: OpenAI::Responses::ComputerTool::Environment::OrSymbol,
|
|
35
|
-
type: Symbol
|
|
36
|
-
).returns(T.attached_class)
|
|
37
|
-
end
|
|
18
|
+
sig { params(type: Symbol).returns(T.attached_class) }
|
|
38
19
|
def self.new(
|
|
39
|
-
# The
|
|
40
|
-
|
|
41
|
-
# The width of the computer display.
|
|
42
|
-
display_width:,
|
|
43
|
-
# The type of computer environment to control.
|
|
44
|
-
environment:,
|
|
45
|
-
# The type of the computer use tool. Always `computer_use_preview`.
|
|
46
|
-
type: :computer_use_preview
|
|
20
|
+
# The type of the computer tool. Always `computer`.
|
|
21
|
+
type: :computer
|
|
47
22
|
)
|
|
48
23
|
end
|
|
49
24
|
|
|
50
|
-
sig
|
|
51
|
-
override.returns(
|
|
52
|
-
{
|
|
53
|
-
display_height: Integer,
|
|
54
|
-
display_width: Integer,
|
|
55
|
-
environment:
|
|
56
|
-
OpenAI::Responses::ComputerTool::Environment::OrSymbol,
|
|
57
|
-
type: Symbol
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
end
|
|
25
|
+
sig { override.returns({ type: Symbol }) }
|
|
61
26
|
def to_hash
|
|
62
27
|
end
|
|
63
|
-
|
|
64
|
-
# The type of computer environment to control.
|
|
65
|
-
module Environment
|
|
66
|
-
extend OpenAI::Internal::Type::Enum
|
|
67
|
-
|
|
68
|
-
TaggedSymbol =
|
|
69
|
-
T.type_alias do
|
|
70
|
-
T.all(Symbol, OpenAI::Responses::ComputerTool::Environment)
|
|
71
|
-
end
|
|
72
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
73
|
-
|
|
74
|
-
WINDOWS =
|
|
75
|
-
T.let(
|
|
76
|
-
:windows,
|
|
77
|
-
OpenAI::Responses::ComputerTool::Environment::TaggedSymbol
|
|
78
|
-
)
|
|
79
|
-
MAC =
|
|
80
|
-
T.let(
|
|
81
|
-
:mac,
|
|
82
|
-
OpenAI::Responses::ComputerTool::Environment::TaggedSymbol
|
|
83
|
-
)
|
|
84
|
-
LINUX =
|
|
85
|
-
T.let(
|
|
86
|
-
:linux,
|
|
87
|
-
OpenAI::Responses::ComputerTool::Environment::TaggedSymbol
|
|
88
|
-
)
|
|
89
|
-
UBUNTU =
|
|
90
|
-
T.let(
|
|
91
|
-
:ubuntu,
|
|
92
|
-
OpenAI::Responses::ComputerTool::Environment::TaggedSymbol
|
|
93
|
-
)
|
|
94
|
-
BROWSER =
|
|
95
|
-
T.let(
|
|
96
|
-
:browser,
|
|
97
|
-
OpenAI::Responses::ComputerTool::Environment::TaggedSymbol
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
sig do
|
|
101
|
-
override.returns(
|
|
102
|
-
T::Array[
|
|
103
|
-
OpenAI::Responses::ComputerTool::Environment::TaggedSymbol
|
|
104
|
-
]
|
|
105
|
-
)
|
|
106
|
-
end
|
|
107
|
-
def self.values
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
28
|
end
|
|
111
29
|
end
|
|
112
30
|
end
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Responses
|
|
6
|
+
class ComputerUsePreviewTool < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
11
|
+
OpenAI::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The height of the computer display.
|
|
16
|
+
sig { returns(Integer) }
|
|
17
|
+
attr_accessor :display_height
|
|
18
|
+
|
|
19
|
+
# The width of the computer display.
|
|
20
|
+
sig { returns(Integer) }
|
|
21
|
+
attr_accessor :display_width
|
|
22
|
+
|
|
23
|
+
# The type of computer environment to control.
|
|
24
|
+
sig do
|
|
25
|
+
returns(
|
|
26
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment::OrSymbol
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
attr_accessor :environment
|
|
30
|
+
|
|
31
|
+
# The type of the computer use tool. Always `computer_use_preview`.
|
|
32
|
+
sig { returns(Symbol) }
|
|
33
|
+
attr_accessor :type
|
|
34
|
+
|
|
35
|
+
# A tool that controls a virtual computer. Learn more about the
|
|
36
|
+
# [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
|
|
37
|
+
sig do
|
|
38
|
+
params(
|
|
39
|
+
display_height: Integer,
|
|
40
|
+
display_width: Integer,
|
|
41
|
+
environment:
|
|
42
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment::OrSymbol,
|
|
43
|
+
type: Symbol
|
|
44
|
+
).returns(T.attached_class)
|
|
45
|
+
end
|
|
46
|
+
def self.new(
|
|
47
|
+
# The height of the computer display.
|
|
48
|
+
display_height:,
|
|
49
|
+
# The width of the computer display.
|
|
50
|
+
display_width:,
|
|
51
|
+
# The type of computer environment to control.
|
|
52
|
+
environment:,
|
|
53
|
+
# The type of the computer use tool. Always `computer_use_preview`.
|
|
54
|
+
type: :computer_use_preview
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
override.returns(
|
|
60
|
+
{
|
|
61
|
+
display_height: Integer,
|
|
62
|
+
display_width: Integer,
|
|
63
|
+
environment:
|
|
64
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment::OrSymbol,
|
|
65
|
+
type: Symbol
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
def to_hash
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# The type of computer environment to control.
|
|
73
|
+
module Environment
|
|
74
|
+
extend OpenAI::Internal::Type::Enum
|
|
75
|
+
|
|
76
|
+
TaggedSymbol =
|
|
77
|
+
T.type_alias do
|
|
78
|
+
T.all(
|
|
79
|
+
Symbol,
|
|
80
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
84
|
+
|
|
85
|
+
WINDOWS =
|
|
86
|
+
T.let(
|
|
87
|
+
:windows,
|
|
88
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment::TaggedSymbol
|
|
89
|
+
)
|
|
90
|
+
MAC =
|
|
91
|
+
T.let(
|
|
92
|
+
:mac,
|
|
93
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment::TaggedSymbol
|
|
94
|
+
)
|
|
95
|
+
LINUX =
|
|
96
|
+
T.let(
|
|
97
|
+
:linux,
|
|
98
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment::TaggedSymbol
|
|
99
|
+
)
|
|
100
|
+
UBUNTU =
|
|
101
|
+
T.let(
|
|
102
|
+
:ubuntu,
|
|
103
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment::TaggedSymbol
|
|
104
|
+
)
|
|
105
|
+
BROWSER =
|
|
106
|
+
T.let(
|
|
107
|
+
:browser,
|
|
108
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment::TaggedSymbol
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
sig do
|
|
112
|
+
override.returns(
|
|
113
|
+
T::Array[
|
|
114
|
+
OpenAI::Responses::ComputerUsePreviewTool::Environment::TaggedSymbol
|
|
115
|
+
]
|
|
116
|
+
)
|
|
117
|
+
end
|
|
118
|
+
def self.values
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
@@ -116,8 +116,8 @@ module OpenAI
|
|
|
116
116
|
T.any(
|
|
117
117
|
OpenAI::Responses::FunctionTool,
|
|
118
118
|
OpenAI::Responses::FileSearchTool,
|
|
119
|
-
OpenAI::Responses::ComputerUseTool,
|
|
120
119
|
OpenAI::Responses::ComputerTool,
|
|
120
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
121
121
|
OpenAI::Responses::Tool::Mcp,
|
|
122
122
|
OpenAI::Responses::Tool::CodeInterpreter,
|
|
123
123
|
OpenAI::Responses::Tool::ImageGeneration,
|
|
@@ -197,8 +197,8 @@ module OpenAI
|
|
|
197
197
|
T.any(
|
|
198
198
|
OpenAI::Responses::FunctionTool::OrHash,
|
|
199
199
|
OpenAI::Responses::FileSearchTool::OrHash,
|
|
200
|
-
OpenAI::Responses::ComputerUseTool::OrHash,
|
|
201
200
|
OpenAI::Responses::ComputerTool::OrHash,
|
|
201
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
202
202
|
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
203
203
|
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
204
204
|
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
@@ -304,8 +304,8 @@ module OpenAI
|
|
|
304
304
|
T.any(
|
|
305
305
|
OpenAI::Responses::FunctionTool,
|
|
306
306
|
OpenAI::Responses::FileSearchTool,
|
|
307
|
-
OpenAI::Responses::ComputerUseTool,
|
|
308
307
|
OpenAI::Responses::ComputerTool,
|
|
308
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
309
309
|
OpenAI::Responses::Tool::Mcp,
|
|
310
310
|
OpenAI::Responses::Tool::CodeInterpreter,
|
|
311
311
|
OpenAI::Responses::Tool::ImageGeneration,
|
|
@@ -374,8 +374,8 @@ module OpenAI
|
|
|
374
374
|
T.any(
|
|
375
375
|
OpenAI::Responses::FunctionTool::OrHash,
|
|
376
376
|
OpenAI::Responses::FileSearchTool::OrHash,
|
|
377
|
-
OpenAI::Responses::ComputerUseTool::OrHash,
|
|
378
377
|
OpenAI::Responses::ComputerTool::OrHash,
|
|
378
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
379
379
|
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
380
380
|
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
381
381
|
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
@@ -357,8 +357,8 @@ module OpenAI
|
|
|
357
357
|
T.any(
|
|
358
358
|
OpenAI::Responses::FunctionTool,
|
|
359
359
|
OpenAI::Responses::FileSearchTool,
|
|
360
|
-
OpenAI::Responses::ComputerUseTool,
|
|
361
360
|
OpenAI::Responses::ComputerTool,
|
|
361
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
362
362
|
OpenAI::Responses::Tool::Mcp,
|
|
363
363
|
OpenAI::Responses::Tool::CodeInterpreter,
|
|
364
364
|
OpenAI::Responses::Tool::ImageGeneration,
|
|
@@ -384,8 +384,8 @@ module OpenAI
|
|
|
384
384
|
T.any(
|
|
385
385
|
OpenAI::Responses::FunctionTool::OrHash,
|
|
386
386
|
OpenAI::Responses::FileSearchTool::OrHash,
|
|
387
|
-
OpenAI::Responses::ComputerUseTool::OrHash,
|
|
388
387
|
OpenAI::Responses::ComputerTool::OrHash,
|
|
388
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
389
389
|
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
390
390
|
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
391
391
|
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
@@ -511,8 +511,8 @@ module OpenAI
|
|
|
511
511
|
T.any(
|
|
512
512
|
OpenAI::Responses::FunctionTool::OrHash,
|
|
513
513
|
OpenAI::Responses::FileSearchTool::OrHash,
|
|
514
|
-
OpenAI::Responses::ComputerUseTool::OrHash,
|
|
515
514
|
OpenAI::Responses::ComputerTool::OrHash,
|
|
515
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
516
516
|
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
517
517
|
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
518
518
|
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
@@ -784,8 +784,8 @@ module OpenAI
|
|
|
784
784
|
T.any(
|
|
785
785
|
OpenAI::Responses::FunctionTool,
|
|
786
786
|
OpenAI::Responses::FileSearchTool,
|
|
787
|
-
OpenAI::Responses::ComputerUseTool,
|
|
788
787
|
OpenAI::Responses::ComputerTool,
|
|
788
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
789
789
|
OpenAI::Responses::Tool::Mcp,
|
|
790
790
|
OpenAI::Responses::Tool::CodeInterpreter,
|
|
791
791
|
OpenAI::Responses::Tool::ImageGeneration,
|
|
@@ -16,22 +16,6 @@ module OpenAI
|
|
|
16
16
|
sig { returns(Symbol) }
|
|
17
17
|
attr_accessor :type
|
|
18
18
|
|
|
19
|
-
# The detail level of the file to be sent to the model. One of `high` or `low`.
|
|
20
|
-
# Defaults to `high`.
|
|
21
|
-
sig do
|
|
22
|
-
returns(
|
|
23
|
-
T.nilable(OpenAI::Responses::ResponseInputFile::Detail::OrSymbol)
|
|
24
|
-
)
|
|
25
|
-
end
|
|
26
|
-
attr_reader :detail
|
|
27
|
-
|
|
28
|
-
sig do
|
|
29
|
-
params(
|
|
30
|
-
detail: OpenAI::Responses::ResponseInputFile::Detail::OrSymbol
|
|
31
|
-
).void
|
|
32
|
-
end
|
|
33
|
-
attr_writer :detail
|
|
34
|
-
|
|
35
19
|
# The content of the file to be sent to the model.
|
|
36
20
|
sig { returns(T.nilable(String)) }
|
|
37
21
|
attr_reader :file_data
|
|
@@ -60,7 +44,6 @@ module OpenAI
|
|
|
60
44
|
# A file input to the model.
|
|
61
45
|
sig do
|
|
62
46
|
params(
|
|
63
|
-
detail: OpenAI::Responses::ResponseInputFile::Detail::OrSymbol,
|
|
64
47
|
file_data: String,
|
|
65
48
|
file_id: T.nilable(String),
|
|
66
49
|
file_url: String,
|
|
@@ -69,9 +52,6 @@ module OpenAI
|
|
|
69
52
|
).returns(T.attached_class)
|
|
70
53
|
end
|
|
71
54
|
def self.new(
|
|
72
|
-
# The detail level of the file to be sent to the model. One of `high` or `low`.
|
|
73
|
-
# Defaults to `high`.
|
|
74
|
-
detail: nil,
|
|
75
55
|
# The content of the file to be sent to the model.
|
|
76
56
|
file_data: nil,
|
|
77
57
|
# The ID of the file to be sent to the model.
|
|
@@ -89,7 +69,6 @@ module OpenAI
|
|
|
89
69
|
override.returns(
|
|
90
70
|
{
|
|
91
71
|
type: Symbol,
|
|
92
|
-
detail: OpenAI::Responses::ResponseInputFile::Detail::OrSymbol,
|
|
93
72
|
file_data: String,
|
|
94
73
|
file_id: T.nilable(String),
|
|
95
74
|
file_url: String,
|
|
@@ -99,39 +78,6 @@ module OpenAI
|
|
|
99
78
|
end
|
|
100
79
|
def to_hash
|
|
101
80
|
end
|
|
102
|
-
|
|
103
|
-
# The detail level of the file to be sent to the model. One of `high` or `low`.
|
|
104
|
-
# Defaults to `high`.
|
|
105
|
-
module Detail
|
|
106
|
-
extend OpenAI::Internal::Type::Enum
|
|
107
|
-
|
|
108
|
-
TaggedSymbol =
|
|
109
|
-
T.type_alias do
|
|
110
|
-
T.all(Symbol, OpenAI::Responses::ResponseInputFile::Detail)
|
|
111
|
-
end
|
|
112
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
113
|
-
|
|
114
|
-
LOW =
|
|
115
|
-
T.let(
|
|
116
|
-
:low,
|
|
117
|
-
OpenAI::Responses::ResponseInputFile::Detail::TaggedSymbol
|
|
118
|
-
)
|
|
119
|
-
HIGH =
|
|
120
|
-
T.let(
|
|
121
|
-
:high,
|
|
122
|
-
OpenAI::Responses::ResponseInputFile::Detail::TaggedSymbol
|
|
123
|
-
)
|
|
124
|
-
|
|
125
|
-
sig do
|
|
126
|
-
override.returns(
|
|
127
|
-
T::Array[
|
|
128
|
-
OpenAI::Responses::ResponseInputFile::Detail::TaggedSymbol
|
|
129
|
-
]
|
|
130
|
-
)
|
|
131
|
-
end
|
|
132
|
-
def self.values
|
|
133
|
-
end
|
|
134
|
-
end
|
|
135
81
|
end
|
|
136
82
|
end
|
|
137
83
|
end
|
|
@@ -16,25 +16,6 @@ module OpenAI
|
|
|
16
16
|
sig { returns(Symbol) }
|
|
17
17
|
attr_accessor :type
|
|
18
18
|
|
|
19
|
-
# The detail level of the file to be sent to the model. One of `high` or `low`.
|
|
20
|
-
# Defaults to `high`.
|
|
21
|
-
sig do
|
|
22
|
-
returns(
|
|
23
|
-
T.nilable(
|
|
24
|
-
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol
|
|
25
|
-
)
|
|
26
|
-
)
|
|
27
|
-
end
|
|
28
|
-
attr_reader :detail
|
|
29
|
-
|
|
30
|
-
sig do
|
|
31
|
-
params(
|
|
32
|
-
detail:
|
|
33
|
-
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol
|
|
34
|
-
).void
|
|
35
|
-
end
|
|
36
|
-
attr_writer :detail
|
|
37
|
-
|
|
38
19
|
# The base64-encoded data of the file to be sent to the model.
|
|
39
20
|
sig { returns(T.nilable(String)) }
|
|
40
21
|
attr_accessor :file_data
|
|
@@ -54,8 +35,6 @@ module OpenAI
|
|
|
54
35
|
# A file input to the model.
|
|
55
36
|
sig do
|
|
56
37
|
params(
|
|
57
|
-
detail:
|
|
58
|
-
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol,
|
|
59
38
|
file_data: T.nilable(String),
|
|
60
39
|
file_id: T.nilable(String),
|
|
61
40
|
file_url: T.nilable(String),
|
|
@@ -64,9 +43,6 @@ module OpenAI
|
|
|
64
43
|
).returns(T.attached_class)
|
|
65
44
|
end
|
|
66
45
|
def self.new(
|
|
67
|
-
# The detail level of the file to be sent to the model. One of `high` or `low`.
|
|
68
|
-
# Defaults to `high`.
|
|
69
|
-
detail: nil,
|
|
70
46
|
# The base64-encoded data of the file to be sent to the model.
|
|
71
47
|
file_data: nil,
|
|
72
48
|
# The ID of the file to be sent to the model.
|
|
@@ -84,8 +60,6 @@ module OpenAI
|
|
|
84
60
|
override.returns(
|
|
85
61
|
{
|
|
86
62
|
type: Symbol,
|
|
87
|
-
detail:
|
|
88
|
-
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol,
|
|
89
63
|
file_data: T.nilable(String),
|
|
90
64
|
file_id: T.nilable(String),
|
|
91
65
|
file_url: T.nilable(String),
|
|
@@ -95,39 +69,6 @@ module OpenAI
|
|
|
95
69
|
end
|
|
96
70
|
def to_hash
|
|
97
71
|
end
|
|
98
|
-
|
|
99
|
-
# The detail level of the file to be sent to the model. One of `high` or `low`.
|
|
100
|
-
# Defaults to `high`.
|
|
101
|
-
module Detail
|
|
102
|
-
extend OpenAI::Internal::Type::Enum
|
|
103
|
-
|
|
104
|
-
TaggedSymbol =
|
|
105
|
-
T.type_alias do
|
|
106
|
-
T.all(Symbol, OpenAI::Responses::ResponseInputFileContent::Detail)
|
|
107
|
-
end
|
|
108
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
109
|
-
|
|
110
|
-
HIGH =
|
|
111
|
-
T.let(
|
|
112
|
-
:high,
|
|
113
|
-
OpenAI::Responses::ResponseInputFileContent::Detail::TaggedSymbol
|
|
114
|
-
)
|
|
115
|
-
LOW =
|
|
116
|
-
T.let(
|
|
117
|
-
:low,
|
|
118
|
-
OpenAI::Responses::ResponseInputFileContent::Detail::TaggedSymbol
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
sig do
|
|
122
|
-
override.returns(
|
|
123
|
-
T::Array[
|
|
124
|
-
OpenAI::Responses::ResponseInputFileContent::Detail::TaggedSymbol
|
|
125
|
-
]
|
|
126
|
-
)
|
|
127
|
-
end
|
|
128
|
-
def self.values
|
|
129
|
-
end
|
|
130
|
-
end
|
|
131
72
|
end
|
|
132
73
|
end
|
|
133
74
|
end
|
|
@@ -64,8 +64,8 @@ module OpenAI
|
|
|
64
64
|
T.any(
|
|
65
65
|
OpenAI::Responses::FunctionTool::OrHash,
|
|
66
66
|
OpenAI::Responses::FileSearchTool::OrHash,
|
|
67
|
-
OpenAI::Responses::ComputerUseTool::OrHash,
|
|
68
67
|
OpenAI::Responses::ComputerTool::OrHash,
|
|
68
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
69
69
|
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
70
70
|
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
71
71
|
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
@@ -19,8 +19,8 @@ module OpenAI
|
|
|
19
19
|
T.any(
|
|
20
20
|
OpenAI::Responses::FunctionTool,
|
|
21
21
|
OpenAI::Responses::FileSearchTool,
|
|
22
|
-
OpenAI::Responses::ComputerUseTool,
|
|
23
22
|
OpenAI::Responses::ComputerTool,
|
|
23
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
24
24
|
OpenAI::Responses::Tool::Mcp,
|
|
25
25
|
OpenAI::Responses::Tool::CodeInterpreter,
|
|
26
26
|
OpenAI::Responses::Tool::ImageGeneration,
|
|
@@ -85,8 +85,8 @@ module OpenAI
|
|
|
85
85
|
T.any(
|
|
86
86
|
OpenAI::Responses::FunctionTool::OrHash,
|
|
87
87
|
OpenAI::Responses::FileSearchTool::OrHash,
|
|
88
|
-
OpenAI::Responses::ComputerUseTool::OrHash,
|
|
89
88
|
OpenAI::Responses::ComputerTool::OrHash,
|
|
89
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
90
90
|
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
91
91
|
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
92
92
|
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
@@ -135,8 +135,8 @@ module OpenAI
|
|
|
135
135
|
T.any(
|
|
136
136
|
OpenAI::Responses::FunctionTool,
|
|
137
137
|
OpenAI::Responses::FileSearchTool,
|
|
138
|
-
OpenAI::Responses::ComputerUseTool,
|
|
139
138
|
OpenAI::Responses::ComputerTool,
|
|
139
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
140
140
|
OpenAI::Responses::Tool::Mcp,
|
|
141
141
|
OpenAI::Responses::Tool::CodeInterpreter,
|
|
142
142
|
OpenAI::Responses::Tool::ImageGeneration,
|
|
@@ -359,8 +359,8 @@ module OpenAI
|
|
|
359
359
|
T.any(
|
|
360
360
|
OpenAI::Responses::FunctionTool,
|
|
361
361
|
OpenAI::Responses::FileSearchTool,
|
|
362
|
-
OpenAI::Responses::ComputerUseTool,
|
|
363
362
|
OpenAI::Responses::ComputerTool,
|
|
363
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
364
364
|
OpenAI::Responses::Tool::Mcp,
|
|
365
365
|
OpenAI::Responses::Tool::CodeInterpreter,
|
|
366
366
|
OpenAI::Responses::Tool::ImageGeneration,
|
|
@@ -386,8 +386,8 @@ module OpenAI
|
|
|
386
386
|
T.any(
|
|
387
387
|
OpenAI::Responses::FunctionTool::OrHash,
|
|
388
388
|
OpenAI::Responses::FileSearchTool::OrHash,
|
|
389
|
-
OpenAI::Responses::ComputerUseTool::OrHash,
|
|
390
389
|
OpenAI::Responses::ComputerTool::OrHash,
|
|
390
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
391
391
|
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
392
392
|
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
393
393
|
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
@@ -514,8 +514,8 @@ module OpenAI
|
|
|
514
514
|
T.any(
|
|
515
515
|
OpenAI::Responses::FunctionTool::OrHash,
|
|
516
516
|
OpenAI::Responses::FileSearchTool::OrHash,
|
|
517
|
-
OpenAI::Responses::ComputerUseTool::OrHash,
|
|
518
517
|
OpenAI::Responses::ComputerTool::OrHash,
|
|
518
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
519
519
|
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
520
520
|
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
521
521
|
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
@@ -797,8 +797,8 @@ module OpenAI
|
|
|
797
797
|
T.any(
|
|
798
798
|
OpenAI::Responses::FunctionTool,
|
|
799
799
|
OpenAI::Responses::FileSearchTool,
|
|
800
|
-
OpenAI::Responses::ComputerUseTool,
|
|
801
800
|
OpenAI::Responses::ComputerTool,
|
|
801
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
802
802
|
OpenAI::Responses::Tool::Mcp,
|
|
803
803
|
OpenAI::Responses::Tool::CodeInterpreter,
|
|
804
804
|
OpenAI::Responses::Tool::ImageGeneration,
|
|
@@ -12,8 +12,8 @@ module OpenAI
|
|
|
12
12
|
T.any(
|
|
13
13
|
OpenAI::Responses::FunctionTool,
|
|
14
14
|
OpenAI::Responses::FileSearchTool,
|
|
15
|
-
OpenAI::Responses::ComputerUseTool,
|
|
16
15
|
OpenAI::Responses::ComputerTool,
|
|
16
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
17
17
|
OpenAI::Responses::Tool::Mcp,
|
|
18
18
|
OpenAI::Responses::Tool::CodeInterpreter,
|
|
19
19
|
OpenAI::Responses::Tool::ImageGeneration,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class VideoCreateCharacterParams < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(OpenAI::VideoCreateCharacterParams, OpenAI::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Display name for this API character.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :name
|
|
17
|
+
|
|
18
|
+
# Video file used to create a character.
|
|
19
|
+
sig { returns(OpenAI::Internal::FileInput) }
|
|
20
|
+
attr_accessor :video
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
name: String,
|
|
25
|
+
video: OpenAI::Internal::FileInput,
|
|
26
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
27
|
+
).returns(T.attached_class)
|
|
28
|
+
end
|
|
29
|
+
def self.new(
|
|
30
|
+
# Display name for this API character.
|
|
31
|
+
name:,
|
|
32
|
+
# Video file used to create a character.
|
|
33
|
+
video:,
|
|
34
|
+
request_options: {}
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
override.returns(
|
|
40
|
+
{
|
|
41
|
+
name: String,
|
|
42
|
+
video: OpenAI::Internal::FileInput,
|
|
43
|
+
request_options: OpenAI::RequestOptions
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
def to_hash
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|