openai 0.106.0 → 0.107.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 +51 -0
- data/README.md +1 -1
- 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 +11 -5
- 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/unknown_server_event.rb +2 -14
- 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 +12 -1
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_completions_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_costs_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_decisions_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_images_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +12 -1
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +12 -1
- 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/version.rb +1 -1
- data/lib/openai.rb +1 -0
- data/rbi/openai/client.rbi +1 -8
- 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 +12 -0
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_decisions_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +12 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +14 -1
- data/rbi/openai/models/responses/response_input_item.rbi +10 -1
- data/realtime.md +22 -3
- data/sig/openai/client.rbs +1 -1
- 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 +10 -0
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_decisions_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_images_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +10 -0
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +10 -0
- data/sig/openai/models/beta/beta_response_input_item.rbs +8 -0
- data/sig/openai/models/responses/response_input_item.rbs +8 -3
- metadata +3 -1
|
@@ -235,6 +235,13 @@ module OpenAI
|
|
|
235
235
|
# @return [Integer, nil]
|
|
236
236
|
optional :input_cache_write_12h_tokens, Integer
|
|
237
237
|
|
|
238
|
+
# @!attribute input_cache_write_30m_tokens
|
|
239
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
240
|
+
# retention period. May be absent or null for older responses.
|
|
241
|
+
#
|
|
242
|
+
# @return [Integer, nil]
|
|
243
|
+
optional :input_cache_write_30m_tokens, Integer, nil?: true
|
|
244
|
+
|
|
238
245
|
# @!attribute input_cache_write_tokens
|
|
239
246
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
240
247
|
# retention period.
|
|
@@ -333,7 +340,7 @@ module OpenAI
|
|
|
333
340
|
# @return [String, nil]
|
|
334
341
|
optional :user_id, String, nil?: true
|
|
335
342
|
|
|
336
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
343
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
337
344
|
# The aggregated completions usage details of the specific time bucket.
|
|
338
345
|
#
|
|
339
346
|
# @param input_tokens [Integer]
|
|
@@ -370,6 +377,10 @@ module OpenAI
|
|
|
370
377
|
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
371
378
|
# retention period.
|
|
372
379
|
#
|
|
380
|
+
# @param input_cache_write_30m_tokens [Integer, nil]
|
|
381
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
382
|
+
# retention period. May be absent or null for older responses.
|
|
383
|
+
#
|
|
373
384
|
# @param input_cache_write_tokens [Integer]
|
|
374
385
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
375
386
|
# retention period.
|
|
@@ -235,6 +235,13 @@ module OpenAI
|
|
|
235
235
|
# @return [Integer, nil]
|
|
236
236
|
optional :input_cache_write_12h_tokens, Integer
|
|
237
237
|
|
|
238
|
+
# @!attribute input_cache_write_30m_tokens
|
|
239
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
240
|
+
# retention period. May be absent or null for older responses.
|
|
241
|
+
#
|
|
242
|
+
# @return [Integer, nil]
|
|
243
|
+
optional :input_cache_write_30m_tokens, Integer, nil?: true
|
|
244
|
+
|
|
238
245
|
# @!attribute input_cache_write_tokens
|
|
239
246
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
240
247
|
# retention period.
|
|
@@ -333,7 +340,7 @@ module OpenAI
|
|
|
333
340
|
# @return [String, nil]
|
|
334
341
|
optional :user_id, String, nil?: true
|
|
335
342
|
|
|
336
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
343
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
337
344
|
# The aggregated completions usage details of the specific time bucket.
|
|
338
345
|
#
|
|
339
346
|
# @param input_tokens [Integer]
|
|
@@ -370,6 +377,10 @@ module OpenAI
|
|
|
370
377
|
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
371
378
|
# retention period.
|
|
372
379
|
#
|
|
380
|
+
# @param input_cache_write_30m_tokens [Integer, nil]
|
|
381
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
382
|
+
# retention period. May be absent or null for older responses.
|
|
383
|
+
#
|
|
373
384
|
# @param input_cache_write_tokens [Integer]
|
|
374
385
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
375
386
|
# retention period.
|
|
@@ -3082,15 +3082,24 @@ module OpenAI
|
|
|
3082
3082
|
# @return [Symbol, :compaction_trigger]
|
|
3083
3083
|
required :type, const: :compaction_trigger
|
|
3084
3084
|
|
|
3085
|
+
# @!attribute id
|
|
3086
|
+
# The unique ID of this compaction trigger.
|
|
3087
|
+
#
|
|
3088
|
+
# @return [String, nil]
|
|
3089
|
+
optional :id, String, nil?: true
|
|
3090
|
+
|
|
3085
3091
|
# @!attribute agent
|
|
3086
3092
|
# The agent that produced this item.
|
|
3087
3093
|
#
|
|
3088
3094
|
# @return [OpenAI::Models::Beta::BetaResponseInputItem::CompactionTrigger::Agent, nil]
|
|
3089
3095
|
optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent }, nil?: true
|
|
3090
3096
|
|
|
3091
|
-
# @!method initialize(agent: nil, type: :compaction_trigger)
|
|
3097
|
+
# @!method initialize(id: nil, agent: nil, type: :compaction_trigger)
|
|
3092
3098
|
# Compacts the current context. Must be the final input item.
|
|
3093
3099
|
#
|
|
3100
|
+
# @param id [String, nil]
|
|
3101
|
+
# The unique ID of this compaction trigger.
|
|
3102
|
+
#
|
|
3094
3103
|
# @param agent [OpenAI::Models::Beta::BetaResponseInputItem::CompactionTrigger::Agent, nil]
|
|
3095
3104
|
# The agent that produced this item.
|
|
3096
3105
|
#
|
|
@@ -2177,9 +2177,18 @@ module OpenAI
|
|
|
2177
2177
|
# @return [Symbol, :compaction_trigger]
|
|
2178
2178
|
required :type, const: :compaction_trigger
|
|
2179
2179
|
|
|
2180
|
-
# @!
|
|
2180
|
+
# @!attribute id
|
|
2181
|
+
# The unique ID of this compaction trigger.
|
|
2182
|
+
#
|
|
2183
|
+
# @return [String, nil]
|
|
2184
|
+
optional :id, String, nil?: true
|
|
2185
|
+
|
|
2186
|
+
# @!method initialize(id: nil, type: :compaction_trigger)
|
|
2181
2187
|
# Compacts the current context. Must be the final input item.
|
|
2182
2188
|
#
|
|
2189
|
+
# @param id [String, nil]
|
|
2190
|
+
# The unique ID of this compaction trigger.
|
|
2191
|
+
#
|
|
2183
2192
|
# @param type [Symbol, :compaction_trigger]
|
|
2184
2193
|
# The type of the item. Always `compaction_trigger`.
|
|
2185
2194
|
end
|
data/lib/openai/version.rb
CHANGED
data/lib/openai.rb
CHANGED
|
@@ -1647,6 +1647,7 @@ require_relative "openai/resources/vector_stores/files"
|
|
|
1647
1647
|
require_relative "openai/resources/videos"
|
|
1648
1648
|
require_relative "openai/resources/webhooks"
|
|
1649
1649
|
require_relative "openai/resources/webhooks/event_types"
|
|
1650
|
+
require_relative "openai/helpers/models/embedding"
|
|
1650
1651
|
require_relative "openai/helpers/models/responses/response"
|
|
1651
1652
|
require_relative "openai/helpers/files"
|
|
1652
1653
|
require_relative "openai/helpers/vector_stores/file_batches"
|
data/rbi/openai/client.rbi
CHANGED
|
@@ -127,14 +127,7 @@ module OpenAI
|
|
|
127
127
|
|
|
128
128
|
# @api private
|
|
129
129
|
sig do
|
|
130
|
-
override
|
|
131
|
-
.params(
|
|
132
|
-
security: {
|
|
133
|
-
bearer_auth?: T::Boolean,
|
|
134
|
-
admin_api_key_auth?: T::Boolean
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
.returns(T::Hash[String, String])
|
|
130
|
+
override.params(security: T::Hash[Symbol, T::Boolean]).returns(T::Hash[String, String])
|
|
138
131
|
end
|
|
139
132
|
private def auth_headers(security:)
|
|
140
133
|
end
|
|
@@ -33,7 +33,42 @@ module OpenAI
|
|
|
33
33
|
request_options: T.untyped,
|
|
34
34
|
transport: T.untyped,
|
|
35
35
|
transport_options: T::Hash[T.untyped, T.untyped],
|
|
36
|
-
block: T.proc.params(connection: TypedConnection).returns(T.untyped)
|
|
36
|
+
block: T.proc.params(connection: TypedConnection[T.untyped, T.untyped]).returns(T.untyped)
|
|
37
|
+
)
|
|
38
|
+
.returns(T.untyped)
|
|
39
|
+
end
|
|
40
|
+
def connect(
|
|
41
|
+
*path_arguments,
|
|
42
|
+
query: {},
|
|
43
|
+
websocket_base_url: nil,
|
|
44
|
+
request_options: nil,
|
|
45
|
+
transport: nil,
|
|
46
|
+
transport_options: {},
|
|
47
|
+
&block
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# @api private
|
|
53
|
+
module TypedResource
|
|
54
|
+
extend T::Generic
|
|
55
|
+
include Resource
|
|
56
|
+
|
|
57
|
+
WebSocketClientEvent = type_member
|
|
58
|
+
WebSocketServerEvent = type_member
|
|
59
|
+
|
|
60
|
+
sig do
|
|
61
|
+
params(
|
|
62
|
+
path_arguments: T.untyped,
|
|
63
|
+
query: T::Hash[T.untyped, T.untyped],
|
|
64
|
+
websocket_base_url: T.nilable(String),
|
|
65
|
+
request_options: T.untyped,
|
|
66
|
+
transport: T.untyped,
|
|
67
|
+
transport_options: T::Hash[T.untyped, T.untyped],
|
|
68
|
+
block: T
|
|
69
|
+
.proc
|
|
70
|
+
.params(connection: TypedConnection[WebSocketClientEvent, WebSocketServerEvent])
|
|
71
|
+
.returns(T.untyped)
|
|
37
72
|
)
|
|
38
73
|
.returns(T.untyped)
|
|
39
74
|
end
|
|
@@ -51,23 +86,26 @@ module OpenAI
|
|
|
51
86
|
|
|
52
87
|
# @api private
|
|
53
88
|
class TypedConnection
|
|
89
|
+
extend T::Generic
|
|
54
90
|
include Enumerable
|
|
55
|
-
|
|
91
|
+
|
|
92
|
+
ClientEvent = type_member(:in)
|
|
93
|
+
Elem = type_member(:out)
|
|
56
94
|
|
|
57
95
|
sig { returns(URI::Generic) }
|
|
58
96
|
attr_reader :url
|
|
59
97
|
|
|
60
|
-
sig { returns(T.
|
|
98
|
+
sig { returns(T.nilable(Elem)) }
|
|
61
99
|
def receive
|
|
62
100
|
end
|
|
63
101
|
|
|
64
|
-
sig { params(event: T.untyped).void }
|
|
102
|
+
sig { params(event: T.any(ClientEvent, T::Hash[T.any(String, Symbol), T.untyped])).void }
|
|
65
103
|
def send_event(event)
|
|
66
104
|
end
|
|
67
105
|
|
|
68
106
|
sig do
|
|
69
|
-
params(block: T.nilable(T.proc.params(event:
|
|
70
|
-
T.any(TypedConnection, T::Enumerator[
|
|
107
|
+
params(block: T.nilable(T.proc.params(event: Elem).void)).returns(
|
|
108
|
+
T.any(TypedConnection[ClientEvent, Elem], T::Enumerator[Elem])
|
|
71
109
|
)
|
|
72
110
|
end
|
|
73
111
|
def each(&block)
|
|
@@ -53,9 +53,7 @@ module OpenAI
|
|
|
53
53
|
]
|
|
54
54
|
),
|
|
55
55
|
model: T.nilable(OpenAI::Internal::Type::Converter::Input),
|
|
56
|
-
security: T.nilable(
|
|
57
|
-
{bearer_auth?: T::Boolean, admin_api_key_auth?: T::Boolean}
|
|
58
|
-
),
|
|
56
|
+
security: T.nilable(T::Hash[Symbol, T::Boolean]),
|
|
59
57
|
options: T.nilable(OpenAI::RequestOptions::OrHash)
|
|
60
58
|
}
|
|
61
59
|
end
|
|
@@ -387,9 +385,7 @@ module OpenAI
|
|
|
387
385
|
]
|
|
388
386
|
),
|
|
389
387
|
model: T.nilable(OpenAI::Internal::Type::Converter::Input),
|
|
390
|
-
security: T.nilable(
|
|
391
|
-
{bearer_auth?: T::Boolean, admin_api_key_auth?: T::Boolean}
|
|
392
|
-
),
|
|
388
|
+
security: T.nilable(T::Hash[Symbol, T::Boolean]),
|
|
393
389
|
options: T.nilable(OpenAI::RequestOptions::OrHash)
|
|
394
390
|
)
|
|
395
391
|
.returns(T.anything)
|
|
@@ -227,6 +227,11 @@ module OpenAI
|
|
|
227
227
|
sig { params(input_cache_write_12h_tokens: Integer).void }
|
|
228
228
|
attr_writer :input_cache_write_12h_tokens
|
|
229
229
|
|
|
230
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
231
|
+
# retention period. May be absent or null for older responses.
|
|
232
|
+
sig { returns(T.nilable(Integer)) }
|
|
233
|
+
attr_accessor :input_cache_write_30m_tokens
|
|
234
|
+
|
|
230
235
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
231
236
|
# retention period.
|
|
232
237
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -350,6 +355,8 @@ module OpenAI
|
|
|
350
355
|
|
|
351
356
|
input_cache_write_12h_tokens: Integer,
|
|
352
357
|
|
|
358
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
359
|
+
|
|
353
360
|
input_cache_write_tokens: Integer,
|
|
354
361
|
|
|
355
362
|
input_cached_audio_tokens: Integer,
|
|
@@ -420,6 +427,10 @@ module OpenAI
|
|
|
420
427
|
# retention period.
|
|
421
428
|
input_cache_write_12h_tokens: nil,
|
|
422
429
|
|
|
430
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
431
|
+
# retention period. May be absent or null for older responses.
|
|
432
|
+
input_cache_write_30m_tokens: nil,
|
|
433
|
+
|
|
423
434
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
424
435
|
# retention period.
|
|
425
436
|
input_cache_write_tokens: nil,
|
|
@@ -491,6 +502,7 @@ module OpenAI
|
|
|
491
502
|
batch: T.nilable(T::Boolean),
|
|
492
503
|
input_audio_tokens: Integer,
|
|
493
504
|
input_cache_write_12h_tokens: Integer,
|
|
505
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
494
506
|
input_cache_write_tokens: Integer,
|
|
495
507
|
input_cached_audio_tokens: Integer,
|
|
496
508
|
input_cached_image_tokens: Integer,
|
|
@@ -229,6 +229,11 @@ module OpenAI
|
|
|
229
229
|
sig { params(input_cache_write_12h_tokens: Integer).void }
|
|
230
230
|
attr_writer :input_cache_write_12h_tokens
|
|
231
231
|
|
|
232
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
233
|
+
# retention period. May be absent or null for older responses.
|
|
234
|
+
sig { returns(T.nilable(Integer)) }
|
|
235
|
+
attr_accessor :input_cache_write_30m_tokens
|
|
236
|
+
|
|
232
237
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
233
238
|
# retention period.
|
|
234
239
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -352,6 +357,8 @@ module OpenAI
|
|
|
352
357
|
|
|
353
358
|
input_cache_write_12h_tokens: Integer,
|
|
354
359
|
|
|
360
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
361
|
+
|
|
355
362
|
input_cache_write_tokens: Integer,
|
|
356
363
|
|
|
357
364
|
input_cached_audio_tokens: Integer,
|
|
@@ -422,6 +429,10 @@ module OpenAI
|
|
|
422
429
|
# retention period.
|
|
423
430
|
input_cache_write_12h_tokens: nil,
|
|
424
431
|
|
|
432
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
433
|
+
# retention period. May be absent or null for older responses.
|
|
434
|
+
input_cache_write_30m_tokens: nil,
|
|
435
|
+
|
|
425
436
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
426
437
|
# retention period.
|
|
427
438
|
input_cache_write_tokens: nil,
|
|
@@ -493,6 +504,7 @@ module OpenAI
|
|
|
493
504
|
batch: T.nilable(T::Boolean),
|
|
494
505
|
input_audio_tokens: Integer,
|
|
495
506
|
input_cache_write_12h_tokens: Integer,
|
|
507
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
496
508
|
input_cache_write_tokens: Integer,
|
|
497
509
|
input_cached_audio_tokens: Integer,
|
|
498
510
|
input_cached_image_tokens: Integer,
|
|
@@ -231,6 +231,11 @@ module OpenAI
|
|
|
231
231
|
sig { params(input_cache_write_12h_tokens: Integer).void }
|
|
232
232
|
attr_writer :input_cache_write_12h_tokens
|
|
233
233
|
|
|
234
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
235
|
+
# retention period. May be absent or null for older responses.
|
|
236
|
+
sig { returns(T.nilable(Integer)) }
|
|
237
|
+
attr_accessor :input_cache_write_30m_tokens
|
|
238
|
+
|
|
234
239
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
235
240
|
# retention period.
|
|
236
241
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -354,6 +359,8 @@ module OpenAI
|
|
|
354
359
|
|
|
355
360
|
input_cache_write_12h_tokens: Integer,
|
|
356
361
|
|
|
362
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
363
|
+
|
|
357
364
|
input_cache_write_tokens: Integer,
|
|
358
365
|
|
|
359
366
|
input_cached_audio_tokens: Integer,
|
|
@@ -424,6 +431,10 @@ module OpenAI
|
|
|
424
431
|
# retention period.
|
|
425
432
|
input_cache_write_12h_tokens: nil,
|
|
426
433
|
|
|
434
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
435
|
+
# retention period. May be absent or null for older responses.
|
|
436
|
+
input_cache_write_30m_tokens: nil,
|
|
437
|
+
|
|
427
438
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
428
439
|
# retention period.
|
|
429
440
|
input_cache_write_tokens: nil,
|
|
@@ -495,6 +506,7 @@ module OpenAI
|
|
|
495
506
|
batch: T.nilable(T::Boolean),
|
|
496
507
|
input_audio_tokens: Integer,
|
|
497
508
|
input_cache_write_12h_tokens: Integer,
|
|
509
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
498
510
|
input_cache_write_tokens: Integer,
|
|
499
511
|
input_cached_audio_tokens: Integer,
|
|
500
512
|
input_cached_image_tokens: Integer,
|
|
@@ -227,6 +227,11 @@ module OpenAI
|
|
|
227
227
|
sig { params(input_cache_write_12h_tokens: Integer).void }
|
|
228
228
|
attr_writer :input_cache_write_12h_tokens
|
|
229
229
|
|
|
230
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
231
|
+
# retention period. May be absent or null for older responses.
|
|
232
|
+
sig { returns(T.nilable(Integer)) }
|
|
233
|
+
attr_accessor :input_cache_write_30m_tokens
|
|
234
|
+
|
|
230
235
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
231
236
|
# retention period.
|
|
232
237
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -350,6 +355,8 @@ module OpenAI
|
|
|
350
355
|
|
|
351
356
|
input_cache_write_12h_tokens: Integer,
|
|
352
357
|
|
|
358
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
359
|
+
|
|
353
360
|
input_cache_write_tokens: Integer,
|
|
354
361
|
|
|
355
362
|
input_cached_audio_tokens: Integer,
|
|
@@ -420,6 +427,10 @@ module OpenAI
|
|
|
420
427
|
# retention period.
|
|
421
428
|
input_cache_write_12h_tokens: nil,
|
|
422
429
|
|
|
430
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
431
|
+
# retention period. May be absent or null for older responses.
|
|
432
|
+
input_cache_write_30m_tokens: nil,
|
|
433
|
+
|
|
423
434
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
424
435
|
# retention period.
|
|
425
436
|
input_cache_write_tokens: nil,
|
|
@@ -491,6 +502,7 @@ module OpenAI
|
|
|
491
502
|
batch: T.nilable(T::Boolean),
|
|
492
503
|
input_audio_tokens: Integer,
|
|
493
504
|
input_cache_write_12h_tokens: Integer,
|
|
505
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
494
506
|
input_cache_write_tokens: Integer,
|
|
495
507
|
input_cached_audio_tokens: Integer,
|
|
496
508
|
input_cached_image_tokens: Integer,
|
|
@@ -223,6 +223,11 @@ module OpenAI
|
|
|
223
223
|
sig { params(input_cache_write_12h_tokens: Integer).void }
|
|
224
224
|
attr_writer :input_cache_write_12h_tokens
|
|
225
225
|
|
|
226
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
227
|
+
# retention period. May be absent or null for older responses.
|
|
228
|
+
sig { returns(T.nilable(Integer)) }
|
|
229
|
+
attr_accessor :input_cache_write_30m_tokens
|
|
230
|
+
|
|
226
231
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
227
232
|
# retention period.
|
|
228
233
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -346,6 +351,8 @@ module OpenAI
|
|
|
346
351
|
|
|
347
352
|
input_cache_write_12h_tokens: Integer,
|
|
348
353
|
|
|
354
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
355
|
+
|
|
349
356
|
input_cache_write_tokens: Integer,
|
|
350
357
|
|
|
351
358
|
input_cached_audio_tokens: Integer,
|
|
@@ -416,6 +423,10 @@ module OpenAI
|
|
|
416
423
|
# retention period.
|
|
417
424
|
input_cache_write_12h_tokens: nil,
|
|
418
425
|
|
|
426
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
427
|
+
# retention period. May be absent or null for older responses.
|
|
428
|
+
input_cache_write_30m_tokens: nil,
|
|
429
|
+
|
|
419
430
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
420
431
|
# retention period.
|
|
421
432
|
input_cache_write_tokens: nil,
|
|
@@ -487,6 +498,7 @@ module OpenAI
|
|
|
487
498
|
batch: T.nilable(T::Boolean),
|
|
488
499
|
input_audio_tokens: Integer,
|
|
489
500
|
input_cache_write_12h_tokens: Integer,
|
|
501
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
490
502
|
input_cache_write_tokens: Integer,
|
|
491
503
|
input_cached_audio_tokens: Integer,
|
|
492
504
|
input_cached_image_tokens: Integer,
|
|
@@ -183,6 +183,11 @@ module OpenAI
|
|
|
183
183
|
sig { returns(T.nilable(Integer)) }
|
|
184
184
|
attr_accessor :input_cache_write_12h_tokens
|
|
185
185
|
|
|
186
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
187
|
+
# retention period.
|
|
188
|
+
sig { returns(T.nilable(Integer)) }
|
|
189
|
+
attr_accessor :input_cache_write_30m_tokens
|
|
190
|
+
|
|
186
191
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
187
192
|
# retention period.
|
|
188
193
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -273,6 +278,8 @@ module OpenAI
|
|
|
273
278
|
|
|
274
279
|
input_cache_write_12h_tokens: T.nilable(Integer),
|
|
275
280
|
|
|
281
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
282
|
+
|
|
276
283
|
input_cache_write_tokens: T.nilable(Integer),
|
|
277
284
|
|
|
278
285
|
input_cached_audio_tokens: T.nilable(Integer),
|
|
@@ -343,6 +350,10 @@ module OpenAI
|
|
|
343
350
|
# retention period.
|
|
344
351
|
input_cache_write_12h_tokens: nil,
|
|
345
352
|
|
|
353
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
354
|
+
# retention period.
|
|
355
|
+
input_cache_write_30m_tokens: nil,
|
|
356
|
+
|
|
346
357
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
347
358
|
# retention period.
|
|
348
359
|
input_cache_write_tokens: nil,
|
|
@@ -414,6 +425,7 @@ module OpenAI
|
|
|
414
425
|
batch: T.nilable(T::Boolean),
|
|
415
426
|
input_audio_tokens: T.nilable(Integer),
|
|
416
427
|
input_cache_write_12h_tokens: T.nilable(Integer),
|
|
428
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
417
429
|
input_cache_write_tokens: T.nilable(Integer),
|
|
418
430
|
input_cached_audio_tokens: T.nilable(Integer),
|
|
419
431
|
input_cached_image_tokens: T.nilable(Integer),
|
|
@@ -227,6 +227,11 @@ module OpenAI
|
|
|
227
227
|
sig { params(input_cache_write_12h_tokens: Integer).void }
|
|
228
228
|
attr_writer :input_cache_write_12h_tokens
|
|
229
229
|
|
|
230
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
231
|
+
# retention period. May be absent or null for older responses.
|
|
232
|
+
sig { returns(T.nilable(Integer)) }
|
|
233
|
+
attr_accessor :input_cache_write_30m_tokens
|
|
234
|
+
|
|
230
235
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
231
236
|
# retention period.
|
|
232
237
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -350,6 +355,8 @@ module OpenAI
|
|
|
350
355
|
|
|
351
356
|
input_cache_write_12h_tokens: Integer,
|
|
352
357
|
|
|
358
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
359
|
+
|
|
353
360
|
input_cache_write_tokens: Integer,
|
|
354
361
|
|
|
355
362
|
input_cached_audio_tokens: Integer,
|
|
@@ -420,6 +427,10 @@ module OpenAI
|
|
|
420
427
|
# retention period.
|
|
421
428
|
input_cache_write_12h_tokens: nil,
|
|
422
429
|
|
|
430
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
431
|
+
# retention period. May be absent or null for older responses.
|
|
432
|
+
input_cache_write_30m_tokens: nil,
|
|
433
|
+
|
|
423
434
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
424
435
|
# retention period.
|
|
425
436
|
input_cache_write_tokens: nil,
|
|
@@ -491,6 +502,7 @@ module OpenAI
|
|
|
491
502
|
batch: T.nilable(T::Boolean),
|
|
492
503
|
input_audio_tokens: Integer,
|
|
493
504
|
input_cache_write_12h_tokens: Integer,
|
|
505
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
494
506
|
input_cache_write_tokens: Integer,
|
|
495
507
|
input_cached_audio_tokens: Integer,
|
|
496
508
|
input_cached_image_tokens: Integer,
|
|
@@ -229,6 +229,11 @@ module OpenAI
|
|
|
229
229
|
sig { params(input_cache_write_12h_tokens: Integer).void }
|
|
230
230
|
attr_writer :input_cache_write_12h_tokens
|
|
231
231
|
|
|
232
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
233
|
+
# retention period. May be absent or null for older responses.
|
|
234
|
+
sig { returns(T.nilable(Integer)) }
|
|
235
|
+
attr_accessor :input_cache_write_30m_tokens
|
|
236
|
+
|
|
232
237
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
233
238
|
# retention period.
|
|
234
239
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -352,6 +357,8 @@ module OpenAI
|
|
|
352
357
|
|
|
353
358
|
input_cache_write_12h_tokens: Integer,
|
|
354
359
|
|
|
360
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
361
|
+
|
|
355
362
|
input_cache_write_tokens: Integer,
|
|
356
363
|
|
|
357
364
|
input_cached_audio_tokens: Integer,
|
|
@@ -422,6 +429,10 @@ module OpenAI
|
|
|
422
429
|
# retention period.
|
|
423
430
|
input_cache_write_12h_tokens: nil,
|
|
424
431
|
|
|
432
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
433
|
+
# retention period. May be absent or null for older responses.
|
|
434
|
+
input_cache_write_30m_tokens: nil,
|
|
435
|
+
|
|
425
436
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
426
437
|
# retention period.
|
|
427
438
|
input_cache_write_tokens: nil,
|
|
@@ -493,6 +504,7 @@ module OpenAI
|
|
|
493
504
|
batch: T.nilable(T::Boolean),
|
|
494
505
|
input_audio_tokens: Integer,
|
|
495
506
|
input_cache_write_12h_tokens: Integer,
|
|
507
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
496
508
|
input_cache_write_tokens: Integer,
|
|
497
509
|
input_cached_audio_tokens: Integer,
|
|
498
510
|
input_cached_image_tokens: Integer,
|
|
@@ -223,6 +223,11 @@ module OpenAI
|
|
|
223
223
|
sig { params(input_cache_write_12h_tokens: Integer).void }
|
|
224
224
|
attr_writer :input_cache_write_12h_tokens
|
|
225
225
|
|
|
226
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
227
|
+
# retention period. May be absent or null for older responses.
|
|
228
|
+
sig { returns(T.nilable(Integer)) }
|
|
229
|
+
attr_accessor :input_cache_write_30m_tokens
|
|
230
|
+
|
|
226
231
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
227
232
|
# retention period.
|
|
228
233
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -346,6 +351,8 @@ module OpenAI
|
|
|
346
351
|
|
|
347
352
|
input_cache_write_12h_tokens: Integer,
|
|
348
353
|
|
|
354
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
355
|
+
|
|
349
356
|
input_cache_write_tokens: Integer,
|
|
350
357
|
|
|
351
358
|
input_cached_audio_tokens: Integer,
|
|
@@ -416,6 +423,10 @@ module OpenAI
|
|
|
416
423
|
# retention period.
|
|
417
424
|
input_cache_write_12h_tokens: nil,
|
|
418
425
|
|
|
426
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
427
|
+
# retention period. May be absent or null for older responses.
|
|
428
|
+
input_cache_write_30m_tokens: nil,
|
|
429
|
+
|
|
419
430
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
420
431
|
# retention period.
|
|
421
432
|
input_cache_write_tokens: nil,
|
|
@@ -487,6 +498,7 @@ module OpenAI
|
|
|
487
498
|
batch: T.nilable(T::Boolean),
|
|
488
499
|
input_audio_tokens: Integer,
|
|
489
500
|
input_cache_write_12h_tokens: Integer,
|
|
501
|
+
input_cache_write_30m_tokens: T.nilable(Integer),
|
|
490
502
|
input_cache_write_tokens: Integer,
|
|
491
503
|
input_cached_audio_tokens: Integer,
|
|
492
504
|
input_cached_image_tokens: Integer,
|