openai 0.106.0 → 0.108.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 +74 -0
- data/README.md +49 -1
- data/examples/chat/tool_runner.rb +33 -0
- data/lib/openai/client.rb +2 -2
- data/lib/openai/helpers/chat/tool_runner.rb +259 -0
- data/lib/openai/helpers/live/websocket.rb +12 -141
- data/lib/openai/helpers/local_audio/process.rb +13 -3
- data/lib/openai/helpers/models/embedding.rb +42 -0
- data/lib/openai/helpers/realtime/connection.rb +22 -5
- data/lib/openai/helpers/realtime/recovery.rb +19 -7
- data/lib/openai/helpers/realtime/translation.rb +37 -169
- data/lib/openai/helpers/realtime/unknown_server_event.rb +5 -12
- data/lib/openai/helpers/responses_websocket/connection.rb +56 -35
- data/lib/openai/helpers/responses_websocket/incremental.rb +5 -1
- data/lib/openai/helpers/responses_websocket/session.rb +11 -4
- data/lib/openai/helpers/responses_websocket/unknown_server_event.rb +2 -14
- data/lib/openai/helpers/streaming/chat_completion_resource.rb +52 -0
- data/lib/openai/helpers/websocket/async_websocket_transport.rb +8 -6
- data/lib/openai/helpers/websocket/client_request.rb +1 -1
- data/lib/openai/helpers/websocket/connection.rb +21 -10
- data/lib/openai/helpers/websocket/connection_manager.rb +2 -1
- data/lib/openai/helpers/websocket/protocol.rb +160 -0
- data/lib/openai/helpers/websocket/typed_connection.rb +22 -16
- data/lib/openai/helpers/websocket/typed_resource.rb +15 -0
- data/lib/openai/internal/transport/base_client.rb +1 -1
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_completions_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_costs_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_decisions_response.rb +14 -3
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_images_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +16 -5
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +16 -5
- data/lib/openai/models/audio/voice_consent.rb +58 -0
- data/lib/openai/models/audio/voice_consent_create_params.rb +57 -0
- data/lib/openai/models/audio/voice_consent_delete_params.rb +22 -0
- data/lib/openai/models/audio/voice_consent_deleted.rb +34 -0
- data/lib/openai/models/audio/voice_consent_list_params.rb +42 -0
- data/lib/openai/models/audio/voice_consent_retrieve_params.rb +22 -0
- data/lib/openai/models/audio/voice_consent_update_params.rb +32 -0
- data/lib/openai/models/beta/beta_response_input_item.rb +10 -1
- data/lib/openai/models/responses/response_input_item.rb +10 -1
- data/lib/openai/resources/audio/voice_consents.rb +163 -0
- data/lib/openai/resources/audio.rb +5 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +9 -0
- data/rbi/openai/client.rbi +1 -8
- data/rbi/openai/helpers/chat/tool_runner.rbi +74 -0
- data/rbi/openai/helpers/realtime/translation.rbi +0 -5
- data/rbi/openai/helpers/realtime/unknown_server_event.rbi +6 -0
- data/rbi/openai/helpers/websocket.rbi +44 -6
- data/rbi/openai/internal/transport/base_client.rbi +2 -6
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_decisions_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +14 -2
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +14 -2
- data/rbi/openai/models/audio/voice_consent.rbi +86 -0
- data/rbi/openai/models/audio/voice_consent_create_params.rbi +92 -0
- data/rbi/openai/models/audio/voice_consent_delete_params.rbi +53 -0
- data/rbi/openai/models/audio/voice_consent_deleted.rbi +62 -0
- data/rbi/openai/models/audio/voice_consent_list_params.rbi +78 -0
- data/rbi/openai/models/audio/voice_consent_retrieve_params.rbi +53 -0
- data/rbi/openai/models/audio/voice_consent_update_params.rbi +62 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +14 -1
- data/rbi/openai/models/response_format_json_schema.rbi +13 -11
- data/rbi/openai/models/responses/response_input_item.rbi +10 -1
- data/rbi/openai/resources/audio/voice_consents.rbi +108 -0
- data/rbi/openai/resources/audio.rbi +4 -0
- data/realtime.md +22 -3
- data/sig/openai/client.rbs +1 -1
- data/sig/openai/helpers/chat/tool_runner.rbs +48 -0
- data/sig/openai/helpers/realtime/translation.rbs +0 -2
- data/sig/openai/helpers/realtime/unknown_server_event.rbs +2 -0
- data/sig/openai/helpers/websocket.rbs +23 -6
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_decisions_response.rbs +11 -1
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_images_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +15 -5
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +15 -5
- data/sig/openai/models/audio/voice_consent.rbs +57 -0
- data/sig/openai/models/audio/voice_consent_create_params.rbs +61 -0
- data/sig/openai/models/audio/voice_consent_delete_params.rbs +25 -0
- data/sig/openai/models/audio/voice_consent_deleted.rbs +31 -0
- data/sig/openai/models/audio/voice_consent_list_params.rbs +57 -0
- data/sig/openai/models/audio/voice_consent_retrieve_params.rbs +25 -0
- data/sig/openai/models/audio/voice_consent_update_params.rbs +36 -0
- data/sig/openai/models/beta/beta_response_input_item.rbs +8 -0
- data/sig/openai/models/responses/response_input_item.rbs +8 -3
- data/sig/openai/resources/audio/voice_consents.rbs +38 -0
- data/sig/openai/resources/audio.rbs +2 -0
- metadata +31 -1
|
@@ -91,6 +91,7 @@ module OpenAI
|
|
|
91
91
|
?batch: bool?,
|
|
92
92
|
?input_audio_tokens: Integer,
|
|
93
93
|
?:input_cache_write_12h_tokens => Integer,
|
|
94
|
+
?:input_cache_write_30m_tokens => Integer?,
|
|
94
95
|
?input_cache_write_tokens: Integer,
|
|
95
96
|
?input_cached_audio_tokens: Integer,
|
|
96
97
|
?input_cached_image_tokens: Integer,
|
|
@@ -153,11 +154,15 @@ module OpenAI
|
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
155
156
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
|
-
# retention period.
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
160
|
+
# The aggregated number of input tokens written to the cache across 30-minute and
|
|
161
|
+
# 12-hour retention periods.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
158
163
|
|
|
159
|
-
# The aggregated number of input tokens written to the cache
|
|
160
|
-
# retention
|
|
164
|
+
# The aggregated number of input tokens written to the cache across 30-minute and
|
|
165
|
+
# 12-hour retention periods.
|
|
161
166
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
162
167
|
|
|
163
168
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -268,9 +273,12 @@ module OpenAI
|
|
|
268
273
|
# @param input_cache_write_12h_tokens
|
|
269
274
|
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
270
275
|
# retention period.
|
|
271
|
-
# @param
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
272
277
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
|
-
# retention period.
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
279
|
+
# @param input_cache_write_tokens
|
|
280
|
+
# The aggregated number of input tokens written to the cache across 30-minute and
|
|
281
|
+
# 12-hour retention periods.
|
|
274
282
|
# @param input_cached_audio_tokens
|
|
275
283
|
# The aggregated number of cached audio input tokens used.
|
|
276
284
|
# @param input_cached_image_tokens
|
|
@@ -315,6 +323,7 @@ module OpenAI
|
|
|
315
323
|
?batch: bool?,
|
|
316
324
|
?input_audio_tokens: Integer,
|
|
317
325
|
?input_cache_write_12h_tokens: Integer,
|
|
326
|
+
?input_cache_write_30m_tokens: Integer?,
|
|
318
327
|
?input_cache_write_tokens: Integer,
|
|
319
328
|
?input_cached_audio_tokens: Integer,
|
|
320
329
|
?input_cached_image_tokens: Integer,
|
|
@@ -343,6 +352,7 @@ module OpenAI
|
|
|
343
352
|
?batch: bool?,
|
|
344
353
|
?input_audio_tokens: Integer,
|
|
345
354
|
?:input_cache_write_12h_tokens => Integer,
|
|
355
|
+
?:input_cache_write_30m_tokens => Integer?,
|
|
346
356
|
?input_cache_write_tokens: Integer,
|
|
347
357
|
?input_cached_audio_tokens: Integer,
|
|
348
358
|
?input_cached_image_tokens: Integer,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Audio
|
|
4
|
+
type voice_consent =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
created_at: Integer,
|
|
8
|
+
language: String,
|
|
9
|
+
name: String,
|
|
10
|
+
?object: :"audio.voice_consent"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class VoiceConsent < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
# The consent recording identifier.
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
# The Unix timestamp (in seconds) for when the consent recording was created.
|
|
18
|
+
attr_accessor created_at: Integer
|
|
19
|
+
|
|
20
|
+
# The BCP 47 language tag for the consent phrase (for example, `en-US`).
|
|
21
|
+
attr_accessor language: String
|
|
22
|
+
|
|
23
|
+
# The label provided when the consent recording was uploaded.
|
|
24
|
+
attr_accessor name: String
|
|
25
|
+
|
|
26
|
+
# The object type, which is always `audio.voice_consent`.
|
|
27
|
+
attr_accessor object: :"audio.voice_consent"
|
|
28
|
+
|
|
29
|
+
# @param id
|
|
30
|
+
# The consent recording identifier.
|
|
31
|
+
# @param created_at
|
|
32
|
+
# The Unix timestamp (in seconds) for when the consent recording was created.
|
|
33
|
+
# @param language
|
|
34
|
+
# The BCP 47 language tag for the consent phrase (for example, `en-US`).
|
|
35
|
+
# @param name
|
|
36
|
+
# The label provided when the consent recording was uploaded.
|
|
37
|
+
# @param object
|
|
38
|
+
# The object type, which is always `audio.voice_consent`.
|
|
39
|
+
def initialize: (
|
|
40
|
+
id: String,
|
|
41
|
+
created_at: Integer,
|
|
42
|
+
language: String,
|
|
43
|
+
name: String,
|
|
44
|
+
?object: :"audio.voice_consent"
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
id: String,
|
|
49
|
+
created_at: Integer,
|
|
50
|
+
language: String,
|
|
51
|
+
name: String,
|
|
52
|
+
?object: :"audio.voice_consent"
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Audio
|
|
4
|
+
type voice_consent_create_params =
|
|
5
|
+
{
|
|
6
|
+
language: String,
|
|
7
|
+
name: String,
|
|
8
|
+
recording: OpenAI::Internal::file_input,
|
|
9
|
+
?request_options: OpenAI::request_opts
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class VoiceConsentCreateParams < OpenAI::Internal::Type::BaseModel
|
|
13
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
14
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
15
|
+
|
|
16
|
+
# The BCP 47 language tag for the consent phrase (for example, `en-US`).
|
|
17
|
+
attr_accessor language: String
|
|
18
|
+
|
|
19
|
+
# The label to use for this consent recording.
|
|
20
|
+
attr_accessor name: String
|
|
21
|
+
|
|
22
|
+
# The consent audio recording file. Maximum size is 10 MiB.
|
|
23
|
+
#
|
|
24
|
+
# Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
|
|
25
|
+
# `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
|
|
26
|
+
#
|
|
27
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
28
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
29
|
+
# content type.
|
|
30
|
+
attr_accessor recording: OpenAI::Internal::file_input
|
|
31
|
+
|
|
32
|
+
# @param language
|
|
33
|
+
# The BCP 47 language tag for the consent phrase (for example, `en-US`).
|
|
34
|
+
# @param name
|
|
35
|
+
# The label to use for this consent recording.
|
|
36
|
+
# @param recording
|
|
37
|
+
# The consent audio recording file. Maximum size is 10 MiB.
|
|
38
|
+
#
|
|
39
|
+
# Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
|
|
40
|
+
# `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
|
|
41
|
+
#
|
|
42
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
43
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
44
|
+
# content type.
|
|
45
|
+
def initialize: (
|
|
46
|
+
language: String,
|
|
47
|
+
name: String,
|
|
48
|
+
recording: OpenAI::Internal::file_input,
|
|
49
|
+
?request_options: OpenAI::request_opts
|
|
50
|
+
) -> void
|
|
51
|
+
|
|
52
|
+
def to_hash: -> {
|
|
53
|
+
language: String,
|
|
54
|
+
name: String,
|
|
55
|
+
recording: OpenAI::Internal::file_input,
|
|
56
|
+
?request_options: OpenAI::RequestOptions
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Audio
|
|
4
|
+
type voice_consent_delete_params =
|
|
5
|
+
{ consent_id: String, ?request_options: OpenAI::request_opts }
|
|
6
|
+
|
|
7
|
+
class VoiceConsentDeleteParams < OpenAI::Internal::Type::BaseModel
|
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor consent_id: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
consent_id: String,
|
|
15
|
+
?request_options: OpenAI::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
consent_id: String,
|
|
20
|
+
?request_options: OpenAI::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Audio
|
|
4
|
+
type voice_consent_deleted =
|
|
5
|
+
{ id: String, deleted: bool, ?object: :"audio.voice_consent" }
|
|
6
|
+
|
|
7
|
+
class VoiceConsentDeleted < OpenAI::Internal::Type::BaseModel
|
|
8
|
+
# The consent recording identifier.
|
|
9
|
+
attr_accessor id: String
|
|
10
|
+
|
|
11
|
+
attr_accessor deleted: bool
|
|
12
|
+
|
|
13
|
+
attr_accessor object: :"audio.voice_consent"
|
|
14
|
+
|
|
15
|
+
# @param id
|
|
16
|
+
# The consent recording identifier.
|
|
17
|
+
def initialize: (
|
|
18
|
+
id: String,
|
|
19
|
+
deleted: bool,
|
|
20
|
+
?object: :"audio.voice_consent"
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
id: String,
|
|
25
|
+
deleted: bool,
|
|
26
|
+
?object: :"audio.voice_consent"
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Audio
|
|
4
|
+
type voice_consent_list_params =
|
|
5
|
+
{
|
|
6
|
+
?after: String,
|
|
7
|
+
?limit: Integer,
|
|
8
|
+
?request_options: OpenAI::request_opts
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class VoiceConsentListParams < OpenAI::Internal::Type::BaseModel
|
|
12
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
13
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
14
|
+
|
|
15
|
+
# A cursor for use in pagination. `after` is an object ID that defines your place
|
|
16
|
+
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
17
|
+
# ending with obj_foo, your subsequent call can include after=obj_foo in order to
|
|
18
|
+
# fetch the next page of the list.
|
|
19
|
+
attr_reader after: String?
|
|
20
|
+
|
|
21
|
+
# A cursor for use in pagination. `after` is an object ID that defines your place
|
|
22
|
+
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
23
|
+
# ending with obj_foo, your subsequent call can include after=obj_foo in order to
|
|
24
|
+
# fetch the next page of the list.
|
|
25
|
+
def after=: (String) -> String
|
|
26
|
+
|
|
27
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and
|
|
28
|
+
# 100, and the default is 20.
|
|
29
|
+
attr_reader limit: Integer?
|
|
30
|
+
|
|
31
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and
|
|
32
|
+
# 100, and the default is 20.
|
|
33
|
+
def limit=: (Integer) -> Integer
|
|
34
|
+
|
|
35
|
+
# @param after
|
|
36
|
+
# A cursor for use in pagination. `after` is an object ID that defines your place
|
|
37
|
+
# in the list. For instance, if you make a list request and receive 100 objects,
|
|
38
|
+
# ending with obj_foo, your subsequent call can include after=obj_foo in order to
|
|
39
|
+
# fetch the next page of the list.
|
|
40
|
+
# @param limit
|
|
41
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and
|
|
42
|
+
# 100, and the default is 20.
|
|
43
|
+
def initialize: (
|
|
44
|
+
?after: String,
|
|
45
|
+
?limit: Integer,
|
|
46
|
+
?request_options: OpenAI::request_opts
|
|
47
|
+
) -> void
|
|
48
|
+
|
|
49
|
+
def to_hash: -> {
|
|
50
|
+
?after: String,
|
|
51
|
+
?limit: Integer,
|
|
52
|
+
?request_options: OpenAI::RequestOptions
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Audio
|
|
4
|
+
type voice_consent_retrieve_params =
|
|
5
|
+
{ consent_id: String, ?request_options: OpenAI::request_opts }
|
|
6
|
+
|
|
7
|
+
class VoiceConsentRetrieveParams < OpenAI::Internal::Type::BaseModel
|
|
8
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor consent_id: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
consent_id: String,
|
|
15
|
+
?request_options: OpenAI::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
consent_id: String,
|
|
20
|
+
?request_options: OpenAI::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Audio
|
|
4
|
+
type voice_consent_update_params =
|
|
5
|
+
{
|
|
6
|
+
consent_id: String,
|
|
7
|
+
name: String,
|
|
8
|
+
?request_options: OpenAI::request_opts
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class VoiceConsentUpdateParams < OpenAI::Internal::Type::BaseModel
|
|
12
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
13
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
14
|
+
|
|
15
|
+
attr_accessor consent_id: String
|
|
16
|
+
|
|
17
|
+
# The updated label for this consent recording.
|
|
18
|
+
attr_accessor name: String
|
|
19
|
+
|
|
20
|
+
# @param name
|
|
21
|
+
# The updated label for this consent recording.
|
|
22
|
+
def initialize: (
|
|
23
|
+
consent_id: String,
|
|
24
|
+
name: String,
|
|
25
|
+
?request_options: OpenAI::request_opts
|
|
26
|
+
) -> void
|
|
27
|
+
|
|
28
|
+
def to_hash: -> {
|
|
29
|
+
consent_id: String,
|
|
30
|
+
name: String,
|
|
31
|
+
?request_options: OpenAI::RequestOptions
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -2756,6 +2756,7 @@ module OpenAI
|
|
|
2756
2756
|
type compaction_trigger =
|
|
2757
2757
|
{
|
|
2758
2758
|
?type: :compaction_trigger,
|
|
2759
|
+
?id: String?,
|
|
2759
2760
|
?agent: OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent?
|
|
2760
2761
|
}
|
|
2761
2762
|
|
|
@@ -2763,20 +2764,27 @@ module OpenAI
|
|
|
2763
2764
|
# The type of the item. Always `compaction_trigger`.
|
|
2764
2765
|
attr_accessor type: :compaction_trigger
|
|
2765
2766
|
|
|
2767
|
+
# The unique ID of this compaction trigger.
|
|
2768
|
+
attr_accessor id: String?
|
|
2769
|
+
|
|
2766
2770
|
# The agent that produced this item.
|
|
2767
2771
|
attr_accessor agent: OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent?
|
|
2768
2772
|
|
|
2773
|
+
# @param id
|
|
2774
|
+
# The unique ID of this compaction trigger.
|
|
2769
2775
|
# @param agent
|
|
2770
2776
|
# The agent that produced this item.
|
|
2771
2777
|
# @param type
|
|
2772
2778
|
# The type of the item. Always `compaction_trigger`.
|
|
2773
2779
|
def initialize: (
|
|
2780
|
+
?id: String?,
|
|
2774
2781
|
?agent: OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent?,
|
|
2775
2782
|
?type: :compaction_trigger
|
|
2776
2783
|
) -> void
|
|
2777
2784
|
|
|
2778
2785
|
def to_hash: -> {
|
|
2779
2786
|
?type: :compaction_trigger,
|
|
2787
|
+
?id: String?,
|
|
2780
2788
|
?agent: OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent?
|
|
2781
2789
|
}
|
|
2782
2790
|
|
|
@@ -1907,17 +1907,22 @@ module OpenAI
|
|
|
1907
1907
|
end
|
|
1908
1908
|
end
|
|
1909
1909
|
|
|
1910
|
-
type compaction_trigger = { ?type: :compaction_trigger }
|
|
1910
|
+
type compaction_trigger = { ?type: :compaction_trigger, ?id: String? }
|
|
1911
1911
|
|
|
1912
1912
|
class CompactionTrigger < OpenAI::Internal::Type::BaseModel
|
|
1913
1913
|
# The type of the item. Always `compaction_trigger`.
|
|
1914
1914
|
attr_accessor type: :compaction_trigger
|
|
1915
1915
|
|
|
1916
|
+
# The unique ID of this compaction trigger.
|
|
1917
|
+
attr_accessor id: String?
|
|
1918
|
+
|
|
1919
|
+
# @param id
|
|
1920
|
+
# The unique ID of this compaction trigger.
|
|
1916
1921
|
# @param type
|
|
1917
1922
|
# The type of the item. Always `compaction_trigger`.
|
|
1918
|
-
def initialize: (?type: :compaction_trigger) -> void
|
|
1923
|
+
def initialize: (?id: String?, ?type: :compaction_trigger) -> void
|
|
1919
1924
|
|
|
1920
|
-
def to_hash: -> { ?type: :compaction_trigger }
|
|
1925
|
+
def to_hash: -> { ?type: :compaction_trigger, ?id: String? }
|
|
1921
1926
|
end
|
|
1922
1927
|
|
|
1923
1928
|
type item_reference =
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Resources
|
|
3
|
+
class Audio
|
|
4
|
+
class VoiceConsents
|
|
5
|
+
def create: (
|
|
6
|
+
language: String,
|
|
7
|
+
name: String,
|
|
8
|
+
recording: OpenAI::Internal::file_input,
|
|
9
|
+
?request_options: OpenAI::request_opts
|
|
10
|
+
) -> OpenAI::Audio::VoiceConsent
|
|
11
|
+
|
|
12
|
+
def retrieve: (
|
|
13
|
+
String consent_id,
|
|
14
|
+
?request_options: OpenAI::request_opts
|
|
15
|
+
) -> OpenAI::Audio::VoiceConsent
|
|
16
|
+
|
|
17
|
+
def update: (
|
|
18
|
+
String consent_id,
|
|
19
|
+
name: String,
|
|
20
|
+
?request_options: OpenAI::request_opts
|
|
21
|
+
) -> OpenAI::Audio::VoiceConsent
|
|
22
|
+
|
|
23
|
+
def list: (
|
|
24
|
+
?after: String,
|
|
25
|
+
?limit: Integer,
|
|
26
|
+
?request_options: OpenAI::request_opts
|
|
27
|
+
) -> OpenAI::Internal::CursorPage[OpenAI::Audio::VoiceConsent]
|
|
28
|
+
|
|
29
|
+
def delete: (
|
|
30
|
+
String consent_id,
|
|
31
|
+
?request_options: OpenAI::request_opts
|
|
32
|
+
) -> OpenAI::Audio::VoiceConsentDeleted
|
|
33
|
+
|
|
34
|
+
def initialize: (client: OpenAI::Client) -> void
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openai
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.108.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAI
|
|
@@ -59,6 +59,7 @@ files:
|
|
|
59
59
|
- bedrock.md
|
|
60
60
|
- docs/architecture/security-model.md
|
|
61
61
|
- examples/audio/record_and_play.rb
|
|
62
|
+
- examples/chat/tool_runner.rb
|
|
62
63
|
- examples/mtls_custom_http_client.rb
|
|
63
64
|
- examples/realtime/README.md
|
|
64
65
|
- examples/realtime/browser/README.md
|
|
@@ -103,6 +104,7 @@ files:
|
|
|
103
104
|
- lib/openai/helpers/beta/agents/tool_dispatcher.rb
|
|
104
105
|
- lib/openai/helpers/beta/agents/tool_error.rb
|
|
105
106
|
- lib/openai/helpers/beta/agents/typed_output.rb
|
|
107
|
+
- lib/openai/helpers/chat/tool_runner.rb
|
|
106
108
|
- lib/openai/helpers/client_options.rb
|
|
107
109
|
- lib/openai/helpers/client_runtime.rb
|
|
108
110
|
- lib/openai/helpers/data_residency.rb
|
|
@@ -114,6 +116,7 @@ files:
|
|
|
114
116
|
- lib/openai/helpers/local_audio/errors.rb
|
|
115
117
|
- lib/openai/helpers/local_audio/process.rb
|
|
116
118
|
- lib/openai/helpers/models/chat/parsed.rb
|
|
119
|
+
- lib/openai/helpers/models/embedding.rb
|
|
117
120
|
- lib/openai/helpers/models/responses/parsed.rb
|
|
118
121
|
- lib/openai/helpers/models/responses/response.rb
|
|
119
122
|
- lib/openai/helpers/models/webhooks/webhook_endpoint_with_secret.rb
|
|
@@ -173,6 +176,7 @@ files:
|
|
|
173
176
|
- lib/openai/helpers/websocket/protocol.rb
|
|
174
177
|
- lib/openai/helpers/websocket/resource.rb
|
|
175
178
|
- lib/openai/helpers/websocket/typed_connection.rb
|
|
179
|
+
- lib/openai/helpers/websocket/typed_resource.rb
|
|
176
180
|
- lib/openai/http_client.rb
|
|
177
181
|
- lib/openai/internal.rb
|
|
178
182
|
- lib/openai/internal/conversation_cursor_page.rb
|
|
@@ -440,6 +444,13 @@ files:
|
|
|
440
444
|
- lib/openai/models/audio/translation_create_response.rb
|
|
441
445
|
- lib/openai/models/audio/translation_verbose.rb
|
|
442
446
|
- lib/openai/models/audio/voice.rb
|
|
447
|
+
- lib/openai/models/audio/voice_consent.rb
|
|
448
|
+
- lib/openai/models/audio/voice_consent_create_params.rb
|
|
449
|
+
- lib/openai/models/audio/voice_consent_delete_params.rb
|
|
450
|
+
- lib/openai/models/audio/voice_consent_deleted.rb
|
|
451
|
+
- lib/openai/models/audio/voice_consent_list_params.rb
|
|
452
|
+
- lib/openai/models/audio/voice_consent_retrieve_params.rb
|
|
453
|
+
- lib/openai/models/audio/voice_consent_update_params.rb
|
|
443
454
|
- lib/openai/models/audio/voice_create_params.rb
|
|
444
455
|
- lib/openai/models/audio_model.rb
|
|
445
456
|
- lib/openai/models/audio_response_format.rb
|
|
@@ -1675,6 +1686,7 @@ files:
|
|
|
1675
1686
|
- lib/openai/resources/audio/speech.rb
|
|
1676
1687
|
- lib/openai/resources/audio/transcriptions.rb
|
|
1677
1688
|
- lib/openai/resources/audio/translations.rb
|
|
1689
|
+
- lib/openai/resources/audio/voice_consents.rb
|
|
1678
1690
|
- lib/openai/resources/audio/voices.rb
|
|
1679
1691
|
- lib/openai/resources/batches.rb
|
|
1680
1692
|
- lib/openai/resources/beta.rb
|
|
@@ -1784,6 +1796,7 @@ files:
|
|
|
1784
1796
|
- rbi/openai/helpers/beta/agents/function_tool.rbi
|
|
1785
1797
|
- rbi/openai/helpers/beta/agents/model_adapter.rbi
|
|
1786
1798
|
- rbi/openai/helpers/beta/agents/tool_error.rbi
|
|
1799
|
+
- rbi/openai/helpers/chat/tool_runner.rbi
|
|
1787
1800
|
- rbi/openai/helpers/client_options.rbi
|
|
1788
1801
|
- rbi/openai/helpers/client_runtime.rbi
|
|
1789
1802
|
- rbi/openai/helpers/data_residency.rbi
|
|
@@ -2096,6 +2109,13 @@ files:
|
|
|
2096
2109
|
- rbi/openai/models/audio/translation_create_response.rbi
|
|
2097
2110
|
- rbi/openai/models/audio/translation_verbose.rbi
|
|
2098
2111
|
- rbi/openai/models/audio/voice.rbi
|
|
2112
|
+
- rbi/openai/models/audio/voice_consent.rbi
|
|
2113
|
+
- rbi/openai/models/audio/voice_consent_create_params.rbi
|
|
2114
|
+
- rbi/openai/models/audio/voice_consent_delete_params.rbi
|
|
2115
|
+
- rbi/openai/models/audio/voice_consent_deleted.rbi
|
|
2116
|
+
- rbi/openai/models/audio/voice_consent_list_params.rbi
|
|
2117
|
+
- rbi/openai/models/audio/voice_consent_retrieve_params.rbi
|
|
2118
|
+
- rbi/openai/models/audio/voice_consent_update_params.rbi
|
|
2099
2119
|
- rbi/openai/models/audio/voice_create_params.rbi
|
|
2100
2120
|
- rbi/openai/models/audio_model.rbi
|
|
2101
2121
|
- rbi/openai/models/audio_response_format.rbi
|
|
@@ -3329,6 +3349,7 @@ files:
|
|
|
3329
3349
|
- rbi/openai/resources/audio/speech.rbi
|
|
3330
3350
|
- rbi/openai/resources/audio/transcriptions.rbi
|
|
3331
3351
|
- rbi/openai/resources/audio/translations.rbi
|
|
3352
|
+
- rbi/openai/resources/audio/voice_consents.rbi
|
|
3332
3353
|
- rbi/openai/resources/audio/voices.rbi
|
|
3333
3354
|
- rbi/openai/resources/batches.rbi
|
|
3334
3355
|
- rbi/openai/resources/beta.rbi
|
|
@@ -3438,6 +3459,7 @@ files:
|
|
|
3438
3459
|
- sig/openai/helpers/beta/agents/function_tool.rbs
|
|
3439
3460
|
- sig/openai/helpers/beta/agents/model_adapter.rbs
|
|
3440
3461
|
- sig/openai/helpers/beta/agents/tool_error.rbs
|
|
3462
|
+
- sig/openai/helpers/chat/tool_runner.rbs
|
|
3441
3463
|
- sig/openai/helpers/client_options.rbs
|
|
3442
3464
|
- sig/openai/helpers/client_runtime.rbs
|
|
3443
3465
|
- sig/openai/helpers/data_residency.rbs
|
|
@@ -3740,6 +3762,13 @@ files:
|
|
|
3740
3762
|
- sig/openai/models/audio/translation_create_response.rbs
|
|
3741
3763
|
- sig/openai/models/audio/translation_verbose.rbs
|
|
3742
3764
|
- sig/openai/models/audio/voice.rbs
|
|
3765
|
+
- sig/openai/models/audio/voice_consent.rbs
|
|
3766
|
+
- sig/openai/models/audio/voice_consent_create_params.rbs
|
|
3767
|
+
- sig/openai/models/audio/voice_consent_delete_params.rbs
|
|
3768
|
+
- sig/openai/models/audio/voice_consent_deleted.rbs
|
|
3769
|
+
- sig/openai/models/audio/voice_consent_list_params.rbs
|
|
3770
|
+
- sig/openai/models/audio/voice_consent_retrieve_params.rbs
|
|
3771
|
+
- sig/openai/models/audio/voice_consent_update_params.rbs
|
|
3743
3772
|
- sig/openai/models/audio/voice_create_params.rbs
|
|
3744
3773
|
- sig/openai/models/audio_model.rbs
|
|
3745
3774
|
- sig/openai/models/audio_response_format.rbs
|
|
@@ -4973,6 +5002,7 @@ files:
|
|
|
4973
5002
|
- sig/openai/resources/audio/speech.rbs
|
|
4974
5003
|
- sig/openai/resources/audio/transcriptions.rbs
|
|
4975
5004
|
- sig/openai/resources/audio/translations.rbs
|
|
5005
|
+
- sig/openai/resources/audio/voice_consents.rbs
|
|
4976
5006
|
- sig/openai/resources/audio/voices.rbs
|
|
4977
5007
|
- sig/openai/resources/batches.rbs
|
|
4978
5008
|
- sig/openai/resources/beta.rbs
|