openai 0.53.0 → 0.55.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/audio/speech_create_params.rb +32 -8
- data/lib/openai/models/chat/chat_completion_audio_param.rb +30 -6
- data/lib/openai/models/image_input_reference_param.rb +23 -0
- data/lib/openai/models/realtime/realtime_audio_config_output.rb +34 -8
- data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +34 -8
- 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/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/audio/speech.rb +1 -1
- data/lib/openai/resources/videos.rb +102 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +7 -0
- data/rbi/openai/client.rbi +6 -0
- data/rbi/openai/models/audio/speech_create_params.rbi +49 -10
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +40 -7
- data/rbi/openai/models/image_input_reference_param.rbi +39 -0
- data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +48 -11
- data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +48 -11
- 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/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/audio/speech.rbi +8 -3
- data/rbi/openai/resources/videos.rbi +84 -2
- data/sig/openai/client.rbs +3 -0
- data/sig/openai/models/audio/speech_create_params.rbs +11 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +11 -0
- data/sig/openai/models/image_input_reference_param.rbs +19 -0
- data/sig/openai/models/realtime/realtime_audio_config_output.rbs +11 -0
- data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +11 -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/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 +23 -2
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class VideoEditParams < 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::VideoEditParams, OpenAI::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Text prompt that describes how to edit the source video.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :prompt
|
|
17
|
+
|
|
18
|
+
# Reference to the completed video to edit.
|
|
19
|
+
sig do
|
|
20
|
+
returns(
|
|
21
|
+
T.any(
|
|
22
|
+
OpenAI::Internal::FileInput,
|
|
23
|
+
OpenAI::VideoEditParams::Video::VideoReferenceInputParam
|
|
24
|
+
)
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
attr_accessor :video
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
prompt: String,
|
|
32
|
+
video:
|
|
33
|
+
T.any(
|
|
34
|
+
OpenAI::Internal::FileInput,
|
|
35
|
+
OpenAI::VideoEditParams::Video::VideoReferenceInputParam::OrHash
|
|
36
|
+
),
|
|
37
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
38
|
+
).returns(T.attached_class)
|
|
39
|
+
end
|
|
40
|
+
def self.new(
|
|
41
|
+
# Text prompt that describes how to edit the source video.
|
|
42
|
+
prompt:,
|
|
43
|
+
# Reference to the completed video to edit.
|
|
44
|
+
video:,
|
|
45
|
+
request_options: {}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
{
|
|
52
|
+
prompt: String,
|
|
53
|
+
video:
|
|
54
|
+
T.any(
|
|
55
|
+
OpenAI::Internal::FileInput,
|
|
56
|
+
OpenAI::VideoEditParams::Video::VideoReferenceInputParam
|
|
57
|
+
),
|
|
58
|
+
request_options: OpenAI::RequestOptions
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
def to_hash
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Reference to the completed video to edit.
|
|
66
|
+
module Video
|
|
67
|
+
extend OpenAI::Internal::Type::Union
|
|
68
|
+
|
|
69
|
+
Variants =
|
|
70
|
+
T.type_alias do
|
|
71
|
+
T.any(
|
|
72
|
+
StringIO,
|
|
73
|
+
OpenAI::VideoEditParams::Video::VideoReferenceInputParam
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
class VideoReferenceInputParam < OpenAI::Internal::Type::BaseModel
|
|
78
|
+
OrHash =
|
|
79
|
+
T.type_alias do
|
|
80
|
+
T.any(
|
|
81
|
+
OpenAI::VideoEditParams::Video::VideoReferenceInputParam,
|
|
82
|
+
OpenAI::Internal::AnyHash
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# The identifier of the completed video.
|
|
87
|
+
sig { returns(String) }
|
|
88
|
+
attr_accessor :id
|
|
89
|
+
|
|
90
|
+
# Reference to the completed video.
|
|
91
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
92
|
+
def self.new(
|
|
93
|
+
# The identifier of the completed video.
|
|
94
|
+
id:
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
sig { override.returns({ id: String }) }
|
|
99
|
+
def to_hash
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
sig do
|
|
104
|
+
override.returns(T::Array[OpenAI::VideoEditParams::Video::Variants])
|
|
105
|
+
end
|
|
106
|
+
def self.variants
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class VideoExtendParams < 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::VideoExtendParams, OpenAI::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Updated text prompt that directs the extension generation.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :prompt
|
|
17
|
+
|
|
18
|
+
# Length of the newly generated extension segment in seconds (allowed values: 4,
|
|
19
|
+
# 8, 12, 16, 20).
|
|
20
|
+
sig { returns(OpenAI::VideoSeconds::OrSymbol) }
|
|
21
|
+
attr_accessor :seconds
|
|
22
|
+
|
|
23
|
+
# Reference to the completed video to extend.
|
|
24
|
+
sig do
|
|
25
|
+
returns(
|
|
26
|
+
T.any(
|
|
27
|
+
OpenAI::Internal::FileInput,
|
|
28
|
+
OpenAI::VideoExtendParams::Video::VideoReferenceInputParam
|
|
29
|
+
)
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
attr_accessor :video
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
prompt: String,
|
|
37
|
+
seconds: OpenAI::VideoSeconds::OrSymbol,
|
|
38
|
+
video:
|
|
39
|
+
T.any(
|
|
40
|
+
OpenAI::Internal::FileInput,
|
|
41
|
+
OpenAI::VideoExtendParams::Video::VideoReferenceInputParam::OrHash
|
|
42
|
+
),
|
|
43
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
44
|
+
).returns(T.attached_class)
|
|
45
|
+
end
|
|
46
|
+
def self.new(
|
|
47
|
+
# Updated text prompt that directs the extension generation.
|
|
48
|
+
prompt:,
|
|
49
|
+
# Length of the newly generated extension segment in seconds (allowed values: 4,
|
|
50
|
+
# 8, 12, 16, 20).
|
|
51
|
+
seconds:,
|
|
52
|
+
# Reference to the completed video to extend.
|
|
53
|
+
video:,
|
|
54
|
+
request_options: {}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
override.returns(
|
|
60
|
+
{
|
|
61
|
+
prompt: String,
|
|
62
|
+
seconds: OpenAI::VideoSeconds::OrSymbol,
|
|
63
|
+
video:
|
|
64
|
+
T.any(
|
|
65
|
+
OpenAI::Internal::FileInput,
|
|
66
|
+
OpenAI::VideoExtendParams::Video::VideoReferenceInputParam
|
|
67
|
+
),
|
|
68
|
+
request_options: OpenAI::RequestOptions
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
def to_hash
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Reference to the completed video to extend.
|
|
76
|
+
module Video
|
|
77
|
+
extend OpenAI::Internal::Type::Union
|
|
78
|
+
|
|
79
|
+
Variants =
|
|
80
|
+
T.type_alias do
|
|
81
|
+
T.any(
|
|
82
|
+
StringIO,
|
|
83
|
+
OpenAI::VideoExtendParams::Video::VideoReferenceInputParam
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
class VideoReferenceInputParam < OpenAI::Internal::Type::BaseModel
|
|
88
|
+
OrHash =
|
|
89
|
+
T.type_alias do
|
|
90
|
+
T.any(
|
|
91
|
+
OpenAI::VideoExtendParams::Video::VideoReferenceInputParam,
|
|
92
|
+
OpenAI::Internal::AnyHash
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# The identifier of the completed video.
|
|
97
|
+
sig { returns(String) }
|
|
98
|
+
attr_accessor :id
|
|
99
|
+
|
|
100
|
+
# Reference to the completed video.
|
|
101
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
102
|
+
def self.new(
|
|
103
|
+
# The identifier of the completed video.
|
|
104
|
+
id:
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
sig { override.returns({ id: String }) }
|
|
109
|
+
def to_hash
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
sig do
|
|
114
|
+
override.returns(T::Array[OpenAI::VideoExtendParams::Video::Variants])
|
|
115
|
+
end
|
|
116
|
+
def self.variants
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class VideoGetCharacterParams < 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::VideoGetCharacterParams, OpenAI::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :character_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
character_id: String,
|
|
20
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(character_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ character_id: String, request_options: OpenAI::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class VideoGetCharacterResponse < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
OpenAI::Models::VideoGetCharacterResponse,
|
|
10
|
+
OpenAI::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Identifier for the character creation cameo.
|
|
15
|
+
sig { returns(T.nilable(String)) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# Unix timestamp (in seconds) when the character was created.
|
|
19
|
+
sig { returns(Integer) }
|
|
20
|
+
attr_accessor :created_at
|
|
21
|
+
|
|
22
|
+
# Display name for the character.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_accessor :name
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
id: T.nilable(String),
|
|
29
|
+
created_at: Integer,
|
|
30
|
+
name: T.nilable(String)
|
|
31
|
+
).returns(T.attached_class)
|
|
32
|
+
end
|
|
33
|
+
def self.new(
|
|
34
|
+
# Identifier for the character creation cameo.
|
|
35
|
+
id:,
|
|
36
|
+
# Unix timestamp (in seconds) when the character was created.
|
|
37
|
+
created_at:,
|
|
38
|
+
# Display name for the character.
|
|
39
|
+
name:
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
sig do
|
|
44
|
+
override.returns(
|
|
45
|
+
{
|
|
46
|
+
id: T.nilable(String),
|
|
47
|
+
created_at: Integer,
|
|
48
|
+
name: T.nilable(String)
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
def to_hash
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
data/rbi/openai/models.rbi
CHANGED
|
@@ -139,6 +139,8 @@ module OpenAI
|
|
|
139
139
|
|
|
140
140
|
ImageGenStreamEvent = OpenAI::Models::ImageGenStreamEvent
|
|
141
141
|
|
|
142
|
+
ImageInputReferenceParam = OpenAI::Models::ImageInputReferenceParam
|
|
143
|
+
|
|
142
144
|
ImageModel = OpenAI::Models::ImageModel
|
|
143
145
|
|
|
144
146
|
ImagesResponse = OpenAI::Models::ImagesResponse
|
|
@@ -244,6 +246,8 @@ module OpenAI
|
|
|
244
246
|
|
|
245
247
|
Video = OpenAI::Models::Video
|
|
246
248
|
|
|
249
|
+
VideoCreateCharacterParams = OpenAI::Models::VideoCreateCharacterParams
|
|
250
|
+
|
|
247
251
|
VideoCreateError = OpenAI::Models::VideoCreateError
|
|
248
252
|
|
|
249
253
|
VideoCreateParams = OpenAI::Models::VideoCreateParams
|
|
@@ -252,6 +256,12 @@ module OpenAI
|
|
|
252
256
|
|
|
253
257
|
VideoDownloadContentParams = OpenAI::Models::VideoDownloadContentParams
|
|
254
258
|
|
|
259
|
+
VideoEditParams = OpenAI::Models::VideoEditParams
|
|
260
|
+
|
|
261
|
+
VideoExtendParams = OpenAI::Models::VideoExtendParams
|
|
262
|
+
|
|
263
|
+
VideoGetCharacterParams = OpenAI::Models::VideoGetCharacterParams
|
|
264
|
+
|
|
255
265
|
VideoListParams = OpenAI::Models::VideoListParams
|
|
256
266
|
|
|
257
267
|
VideoModel = OpenAI::Models::VideoModel
|
|
@@ -13,7 +13,11 @@ module OpenAI
|
|
|
13
13
|
input: String,
|
|
14
14
|
model: T.any(String, OpenAI::Audio::SpeechModel::OrSymbol),
|
|
15
15
|
voice:
|
|
16
|
-
T.any(
|
|
16
|
+
T.any(
|
|
17
|
+
String,
|
|
18
|
+
OpenAI::Audio::SpeechCreateParams::Voice::OrSymbol,
|
|
19
|
+
OpenAI::Audio::SpeechCreateParams::Voice::ID::OrHash
|
|
20
|
+
),
|
|
17
21
|
instructions: String,
|
|
18
22
|
response_format:
|
|
19
23
|
OpenAI::Audio::SpeechCreateParams::ResponseFormat::OrSymbol,
|
|
@@ -31,8 +35,9 @@ module OpenAI
|
|
|
31
35
|
model:,
|
|
32
36
|
# The voice to use when generating the audio. Supported built-in voices are
|
|
33
37
|
# `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
|
|
34
|
-
# `shimmer`, `verse`, `marin`, and `cedar`.
|
|
35
|
-
#
|
|
38
|
+
# `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice
|
|
39
|
+
# object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
|
|
40
|
+
# voices are available in the
|
|
36
41
|
# [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
|
|
37
42
|
voice:,
|
|
38
43
|
# Control the voice of your generated audio with additional instructions. Does not
|
|
@@ -7,7 +7,11 @@ module OpenAI
|
|
|
7
7
|
sig do
|
|
8
8
|
params(
|
|
9
9
|
prompt: String,
|
|
10
|
-
input_reference:
|
|
10
|
+
input_reference:
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Internal::FileInput,
|
|
13
|
+
OpenAI::ImageInputReferenceParam::OrHash
|
|
14
|
+
),
|
|
11
15
|
model: T.any(String, OpenAI::VideoModel::OrSymbol),
|
|
12
16
|
seconds: OpenAI::VideoSeconds::OrSymbol,
|
|
13
17
|
size: OpenAI::VideoSize::OrSymbol,
|
|
@@ -17,7 +21,7 @@ module OpenAI
|
|
|
17
21
|
def create(
|
|
18
22
|
# Text prompt that describes the video to generate.
|
|
19
23
|
prompt:,
|
|
20
|
-
# Optional
|
|
24
|
+
# Optional reference asset upload or reference object that guides generation.
|
|
21
25
|
input_reference: nil,
|
|
22
26
|
# The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults
|
|
23
27
|
# to `sora-2`.
|
|
@@ -80,6 +84,23 @@ module OpenAI
|
|
|
80
84
|
)
|
|
81
85
|
end
|
|
82
86
|
|
|
87
|
+
# Create a character from an uploaded video.
|
|
88
|
+
sig do
|
|
89
|
+
params(
|
|
90
|
+
name: String,
|
|
91
|
+
video: OpenAI::Internal::FileInput,
|
|
92
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
93
|
+
).returns(OpenAI::Models::VideoCreateCharacterResponse)
|
|
94
|
+
end
|
|
95
|
+
def create_character(
|
|
96
|
+
# Display name for this API character.
|
|
97
|
+
name:,
|
|
98
|
+
# Video file used to create a character.
|
|
99
|
+
video:,
|
|
100
|
+
request_options: {}
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
|
|
83
104
|
# Download the generated video bytes or a derived preview asset.
|
|
84
105
|
#
|
|
85
106
|
# Streams the rendered video content for the specified video job.
|
|
@@ -99,6 +120,67 @@ module OpenAI
|
|
|
99
120
|
)
|
|
100
121
|
end
|
|
101
122
|
|
|
123
|
+
# Create a new video generation job by editing a source video or existing
|
|
124
|
+
# generated video.
|
|
125
|
+
sig do
|
|
126
|
+
params(
|
|
127
|
+
prompt: String,
|
|
128
|
+
video:
|
|
129
|
+
T.any(
|
|
130
|
+
OpenAI::Internal::FileInput,
|
|
131
|
+
OpenAI::VideoEditParams::Video::VideoReferenceInputParam::OrHash
|
|
132
|
+
),
|
|
133
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
134
|
+
).returns(OpenAI::Video)
|
|
135
|
+
end
|
|
136
|
+
def edit(
|
|
137
|
+
# Text prompt that describes how to edit the source video.
|
|
138
|
+
prompt:,
|
|
139
|
+
# Reference to the completed video to edit.
|
|
140
|
+
video:,
|
|
141
|
+
request_options: {}
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Create an extension of a completed video.
|
|
146
|
+
sig do
|
|
147
|
+
params(
|
|
148
|
+
prompt: String,
|
|
149
|
+
seconds: OpenAI::VideoSeconds::OrSymbol,
|
|
150
|
+
video:
|
|
151
|
+
T.any(
|
|
152
|
+
OpenAI::Internal::FileInput,
|
|
153
|
+
OpenAI::VideoExtendParams::Video::VideoReferenceInputParam::OrHash
|
|
154
|
+
),
|
|
155
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
156
|
+
).returns(OpenAI::Video)
|
|
157
|
+
end
|
|
158
|
+
def extend_(
|
|
159
|
+
# Updated text prompt that directs the extension generation.
|
|
160
|
+
prompt:,
|
|
161
|
+
# Length of the newly generated extension segment in seconds (allowed values: 4,
|
|
162
|
+
# 8, 12, 16, 20).
|
|
163
|
+
seconds:,
|
|
164
|
+
# Reference to the completed video to extend.
|
|
165
|
+
video:,
|
|
166
|
+
request_options: {}
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Fetch a character.
|
|
171
|
+
sig do
|
|
172
|
+
params(
|
|
173
|
+
character_id: String,
|
|
174
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
175
|
+
).returns(OpenAI::Models::VideoGetCharacterResponse)
|
|
176
|
+
end
|
|
177
|
+
def get_character(
|
|
178
|
+
# The identifier of the character to retrieve.
|
|
179
|
+
character_id,
|
|
180
|
+
request_options: {}
|
|
181
|
+
)
|
|
182
|
+
end
|
|
183
|
+
|
|
102
184
|
# Create a remix of a completed video using a refreshed prompt.
|
|
103
185
|
sig do
|
|
104
186
|
params(
|
data/sig/openai/client.rbs
CHANGED
|
@@ -14,6 +14,8 @@ module OpenAI
|
|
|
14
14
|
|
|
15
15
|
attr_reader project: String?
|
|
16
16
|
|
|
17
|
+
attr_reader webhook_secret: String?
|
|
18
|
+
|
|
17
19
|
attr_reader completions: OpenAI::Resources::Completions
|
|
18
20
|
|
|
19
21
|
attr_reader chat: OpenAI::Resources::Chat
|
|
@@ -64,6 +66,7 @@ module OpenAI
|
|
|
64
66
|
?api_key: String?,
|
|
65
67
|
?organization: String?,
|
|
66
68
|
?project: String?,
|
|
69
|
+
?webhook_secret: String?,
|
|
67
70
|
?base_url: String?,
|
|
68
71
|
?max_retries: Integer,
|
|
69
72
|
?timeout: Float,
|
|
@@ -85,10 +85,21 @@ module OpenAI
|
|
|
85
85
|
| :verse
|
|
86
86
|
| :marin
|
|
87
87
|
| :cedar
|
|
88
|
+
| OpenAI::Audio::SpeechCreateParams::Voice::ID
|
|
88
89
|
|
|
89
90
|
module Voice
|
|
90
91
|
extend OpenAI::Internal::Type::Union
|
|
91
92
|
|
|
93
|
+
type id = { id: String }
|
|
94
|
+
|
|
95
|
+
class ID < OpenAI::Internal::Type::BaseModel
|
|
96
|
+
attr_accessor id: String
|
|
97
|
+
|
|
98
|
+
def initialize: (id: String) -> void
|
|
99
|
+
|
|
100
|
+
def to_hash: -> { id: String }
|
|
101
|
+
end
|
|
102
|
+
|
|
92
103
|
def self?.variants: -> ::Array[OpenAI::Models::Audio::SpeechCreateParams::voice]
|
|
93
104
|
|
|
94
105
|
ALLOY: :alloy
|
|
@@ -51,10 +51,21 @@ module OpenAI
|
|
|
51
51
|
| :verse
|
|
52
52
|
| :marin
|
|
53
53
|
| :cedar
|
|
54
|
+
| OpenAI::Chat::ChatCompletionAudioParam::Voice::ID
|
|
54
55
|
|
|
55
56
|
module Voice
|
|
56
57
|
extend OpenAI::Internal::Type::Union
|
|
57
58
|
|
|
59
|
+
type id = { id: String }
|
|
60
|
+
|
|
61
|
+
class ID < OpenAI::Internal::Type::BaseModel
|
|
62
|
+
attr_accessor id: String
|
|
63
|
+
|
|
64
|
+
def initialize: (id: String) -> void
|
|
65
|
+
|
|
66
|
+
def to_hash: -> { id: String }
|
|
67
|
+
end
|
|
68
|
+
|
|
58
69
|
def self?.variants: -> ::Array[OpenAI::Models::Chat::ChatCompletionAudioParam::voice]
|
|
59
70
|
|
|
60
71
|
ALLOY: :alloy
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
type image_input_reference_param = { file_id: String, image_url: String }
|
|
4
|
+
|
|
5
|
+
class ImageInputReferenceParam < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
attr_reader file_id: String?
|
|
7
|
+
|
|
8
|
+
def file_id=: (String) -> String
|
|
9
|
+
|
|
10
|
+
attr_reader image_url: String?
|
|
11
|
+
|
|
12
|
+
def image_url=: (String) -> String
|
|
13
|
+
|
|
14
|
+
def initialize: (?file_id: String, ?image_url: String) -> void
|
|
15
|
+
|
|
16
|
+
def to_hash: -> { file_id: String, image_url: String }
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -49,10 +49,21 @@ module OpenAI
|
|
|
49
49
|
| :verse
|
|
50
50
|
| :marin
|
|
51
51
|
| :cedar
|
|
52
|
+
| OpenAI::Realtime::RealtimeAudioConfigOutput::Voice::ID
|
|
52
53
|
|
|
53
54
|
module Voice
|
|
54
55
|
extend OpenAI::Internal::Type::Union
|
|
55
56
|
|
|
57
|
+
type id = { id: String }
|
|
58
|
+
|
|
59
|
+
class ID < OpenAI::Internal::Type::BaseModel
|
|
60
|
+
attr_accessor id: String
|
|
61
|
+
|
|
62
|
+
def initialize: (id: String) -> void
|
|
63
|
+
|
|
64
|
+
def to_hash: -> { id: String }
|
|
65
|
+
end
|
|
66
|
+
|
|
56
67
|
def self?.variants: -> ::Array[OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice]
|
|
57
68
|
|
|
58
69
|
ALLOY: :alloy
|
|
@@ -60,10 +60,21 @@ module OpenAI
|
|
|
60
60
|
| :verse
|
|
61
61
|
| :marin
|
|
62
62
|
| :cedar
|
|
63
|
+
| OpenAI::Realtime::RealtimeResponseCreateAudioOutput::Output::Voice::ID
|
|
63
64
|
|
|
64
65
|
module Voice
|
|
65
66
|
extend OpenAI::Internal::Type::Union
|
|
66
67
|
|
|
68
|
+
type id = { id: String }
|
|
69
|
+
|
|
70
|
+
class ID < OpenAI::Internal::Type::BaseModel
|
|
71
|
+
attr_accessor id: String
|
|
72
|
+
|
|
73
|
+
def initialize: (id: String) -> void
|
|
74
|
+
|
|
75
|
+
def to_hash: -> { id: String }
|
|
76
|
+
end
|
|
77
|
+
|
|
67
78
|
def self?.variants: -> ::Array[OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice]
|
|
68
79
|
|
|
69
80
|
ALLOY: :alloy
|
|
@@ -4,7 +4,6 @@ module OpenAI
|
|
|
4
4
|
type response_input_file =
|
|
5
5
|
{
|
|
6
6
|
type: :input_file,
|
|
7
|
-
detail: OpenAI::Models::Responses::ResponseInputFile::detail,
|
|
8
7
|
file_data: String,
|
|
9
8
|
file_id: String?,
|
|
10
9
|
file_url: String,
|
|
@@ -14,12 +13,6 @@ module OpenAI
|
|
|
14
13
|
class ResponseInputFile < OpenAI::Internal::Type::BaseModel
|
|
15
14
|
attr_accessor type: :input_file
|
|
16
15
|
|
|
17
|
-
attr_reader detail: OpenAI::Models::Responses::ResponseInputFile::detail?
|
|
18
|
-
|
|
19
|
-
def detail=: (
|
|
20
|
-
OpenAI::Models::Responses::ResponseInputFile::detail
|
|
21
|
-
) -> OpenAI::Models::Responses::ResponseInputFile::detail
|
|
22
|
-
|
|
23
16
|
attr_reader file_data: String?
|
|
24
17
|
|
|
25
18
|
def file_data=: (String) -> String
|
|
@@ -35,7 +28,6 @@ module OpenAI
|
|
|
35
28
|
def filename=: (String) -> String
|
|
36
29
|
|
|
37
30
|
def initialize: (
|
|
38
|
-
?detail: OpenAI::Models::Responses::ResponseInputFile::detail,
|
|
39
31
|
?file_data: String,
|
|
40
32
|
?file_id: String?,
|
|
41
33
|
?file_url: String,
|
|
@@ -45,23 +37,11 @@ module OpenAI
|
|
|
45
37
|
|
|
46
38
|
def to_hash: -> {
|
|
47
39
|
type: :input_file,
|
|
48
|
-
detail: OpenAI::Models::Responses::ResponseInputFile::detail,
|
|
49
40
|
file_data: String,
|
|
50
41
|
file_id: String?,
|
|
51
42
|
file_url: String,
|
|
52
43
|
filename: String
|
|
53
44
|
}
|
|
54
|
-
|
|
55
|
-
type detail = :low | :high
|
|
56
|
-
|
|
57
|
-
module Detail
|
|
58
|
-
extend OpenAI::Internal::Type::Enum
|
|
59
|
-
|
|
60
|
-
LOW: :low
|
|
61
|
-
HIGH: :high
|
|
62
|
-
|
|
63
|
-
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseInputFile::detail]
|
|
64
|
-
end
|
|
65
45
|
end
|
|
66
46
|
end
|
|
67
47
|
end
|