openai 0.105.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 +67 -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/external_storage_configuration.rb +1 -0
- 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/agent_create_params.rb +3 -0
- data/lib/openai/models/beta/agent_update_params.rb +3 -0
- data/lib/openai/models/beta/agents/session_create_params.rb +3 -0
- data/lib/openai/models/beta/agents/session_update_params.rb +3 -0
- data/lib/openai/models/beta/assistant_update_params.rb +12 -0
- data/lib/openai/models/beta/beta_response.rb +12 -0
- data/lib/openai/models/beta/beta_response_input_item.rb +10 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +12 -0
- data/lib/openai/models/beta/response_compact_params.rb +12 -0
- data/lib/openai/models/beta/response_create_params.rb +12 -0
- data/lib/openai/models/chat_model.rb +12 -0
- data/lib/openai/models/decision_create_params.rb +112 -1
- data/lib/openai/models/decision_input_image.rb +14 -1
- data/lib/openai/models/decision_input_text.rb +15 -1
- data/lib/openai/models/decision_prompt_cache_breakpoint.rb +21 -0
- data/lib/openai/models/live/sideband_server_event.rb +243 -3
- data/lib/openai/models/responses/response_compact_params.rb +12 -0
- data/lib/openai/models/responses/response_input_item.rb +10 -1
- data/lib/openai/models.rb +2 -0
- data/lib/openai/resources/beta/responses.rb +19 -0
- data/lib/openai/resources/decisions.rb +15 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +2 -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/external_storage_configuration.rbi +1 -0
- 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/agent_create_params.rbi +3 -0
- data/rbi/openai/models/beta/agent_update_params.rbi +3 -0
- data/rbi/openai/models/beta/agents/session_create_params.rbi +3 -0
- data/rbi/openai/models/beta/agents/session_update_params.rbi +3 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +14 -1
- data/rbi/openai/models/decision_create_params.rbi +146 -0
- data/rbi/openai/models/decision_input_image.rbi +22 -1
- data/rbi/openai/models/decision_input_text.rbi +21 -1
- data/rbi/openai/models/decision_prompt_cache_breakpoint.rbi +48 -0
- data/rbi/openai/models/live/output_audio_delta_event.rbi +1 -1
- data/rbi/openai/models/live/sideband_server_event.rbi +406 -3
- data/rbi/openai/models/responses/response_input_item.rbi +10 -1
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/beta/responses.rbi +17 -0
- data/rbi/openai/resources/decisions.rbi +14 -0
- 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/external_storage_configuration.rbs +2 -1
- 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/agent_create_params.rbs +5 -1
- data/sig/openai/models/beta/agent_update_params.rbs +5 -1
- data/sig/openai/models/beta/agents/session_create_params.rbs +5 -1
- data/sig/openai/models/beta/agents/session_update_params.rbs +5 -1
- data/sig/openai/models/beta/beta_response_input_item.rbs +8 -0
- data/sig/openai/models/decision_create_params.rbs +106 -0
- data/sig/openai/models/decision_input_image.rbs +18 -2
- data/sig/openai/models/decision_input_text.rbs +29 -3
- data/sig/openai/models/decision_prompt_cache_breakpoint.rbs +16 -0
- data/sig/openai/models/live/sideband_server_event.rbs +225 -0
- data/sig/openai/models/responses/response_input_item.rbs +8 -3
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/resources/beta/responses.rbs +7 -0
- data/sig/openai/resources/decisions.rbs +3 -0
- metadata +6 -1
data/realtime.md
CHANGED
|
@@ -468,6 +468,8 @@ Malformed known events raise `OpenAI::Errors::RealtimeProtocolError`. A valid
|
|
|
468
468
|
JSON object with a newer, unknown event discriminator is returned as
|
|
469
469
|
`OpenAI::Realtime::UnknownServerEvent`, preserving its deeply frozen payload so
|
|
470
470
|
an additive service event does not terminate an otherwise healthy session.
|
|
471
|
+
Its `inspect` and `to_s` output omits remote values. Access `type`, `data`, or
|
|
472
|
+
`to_h` explicitly when those values are needed.
|
|
471
473
|
|
|
472
474
|
```ruby
|
|
473
475
|
connection.each do |event|
|
|
@@ -495,6 +497,11 @@ Connection and protocol failures use distinct error classes:
|
|
|
495
497
|
- `OpenAI::Errors::RealtimeProtocolError` exposes the invalid raw `data` and
|
|
496
498
|
original `cause`.
|
|
497
499
|
|
|
500
|
+
For these connection and protocol errors, default rendering, including
|
|
501
|
+
`full_message`, suppresses native cause chains, including exceptions active when
|
|
502
|
+
an SDK state check fails. Explicit `data` and `cause` access can expose remote
|
|
503
|
+
payloads or credentials; sanitize these values before logging or sharing them.
|
|
504
|
+
|
|
498
505
|
The configured request timeout bounds WebSocket negotiation. It does not become
|
|
499
506
|
an idle-session deadline after the connection is established.
|
|
500
507
|
|
|
@@ -595,6 +602,18 @@ The examples in this guide cover local function calling, image input, and MCP
|
|
|
595
602
|
approval through the generic Realtime connection API, alongside generated
|
|
596
603
|
WebRTC/SDP call creation and sideband control of existing WebRTC and SIP calls.
|
|
597
604
|
Continuous microphone capture, concurrent live captioning, full-duplex
|
|
598
|
-
conversation, SIP call-ownership orchestration
|
|
599
|
-
|
|
600
|
-
|
|
605
|
+
conversation, and SIP call-ownership orchestration are outside this guide's
|
|
606
|
+
scope.
|
|
607
|
+
|
|
608
|
+
## Translation connections
|
|
609
|
+
|
|
610
|
+
The SDK also supports the separate Translation WebSocket protocol through
|
|
611
|
+
`client.realtime.connect_translation(model: ...) { |connection| ... }`.
|
|
612
|
+
It uses Translation event types rather than the Realtime events shown above.
|
|
613
|
+
See the [Translation connection helper](lib/openai/helpers/realtime/translation.rb)
|
|
614
|
+
and [server event types](lib/openai/models/realtime/realtime_translation_server_event.rb).
|
|
615
|
+
|
|
616
|
+
After sending input, call `connection.finish(timeout: ...)` with a block to
|
|
617
|
+
consume the remaining events through `session.closed`. Finish calls must be
|
|
618
|
+
sequential, with no competing reader. Keep the connection inside its opening
|
|
619
|
+
block so the SDK can clean it up when the block exits.
|
data/sig/openai/client.rbs
CHANGED
|
@@ -75,7 +75,7 @@ module OpenAI
|
|
|
75
75
|
attr_reader videos: OpenAI::Resources::Videos
|
|
76
76
|
|
|
77
77
|
private def auth_headers: (
|
|
78
|
-
security: { :
|
|
78
|
+
security: { ?bearer_auth: bool, ?admin_api_key_auth: bool }
|
|
79
79
|
) -> ::Hash[String, String]
|
|
80
80
|
|
|
81
81
|
private def bearer_auth: -> ::Hash[String, String]
|
|
@@ -31,8 +31,6 @@ module OpenAI
|
|
|
31
31
|
| ::Hash[Symbol | String, untyped]
|
|
32
32
|
|
|
33
33
|
class UnknownTranslationServerEvent < OpenAI::Realtime::UnknownServerEvent
|
|
34
|
-
def inspect: -> String
|
|
35
|
-
alias to_s inspect
|
|
36
34
|
end
|
|
37
35
|
class TranslationConnection
|
|
38
36
|
include Enumerable[OpenAI::Models::Realtime::translation_connection_server_event]
|
|
@@ -23,17 +23,34 @@ module OpenAI
|
|
|
23
23
|
?transport: untyped,
|
|
24
24
|
?transport_options: Hash[untyped, untyped]
|
|
25
25
|
) {
|
|
26
|
-
(TypedConnection) -> untyped
|
|
26
|
+
(TypedConnection[untyped, untyped]) -> untyped
|
|
27
27
|
} -> untyped
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
include
|
|
30
|
+
module TypedResource[WebSocketClientEvent, WebSocketServerEvent]
|
|
31
|
+
include Resource
|
|
32
|
+
|
|
33
|
+
def connect: (
|
|
34
|
+
*untyped path_arguments,
|
|
35
|
+
?query: Hash[untyped, untyped],
|
|
36
|
+
?websocket_base_url: String?,
|
|
37
|
+
?request_options: untyped,
|
|
38
|
+
?transport: untyped,
|
|
39
|
+
?transport_options: Hash[untyped, untyped]
|
|
40
|
+
) {
|
|
41
|
+
(TypedConnection[WebSocketClientEvent, WebSocketServerEvent]) -> untyped
|
|
42
|
+
} -> untyped
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
class TypedConnection[in ClientEvent, out Elem]
|
|
46
|
+
include Enumerable[Elem]
|
|
32
47
|
|
|
33
48
|
attr_reader url: URI::Generic
|
|
34
|
-
def receive: ->
|
|
35
|
-
def send_event: (
|
|
36
|
-
|
|
49
|
+
def receive: -> Elem?
|
|
50
|
+
def send_event: (
|
|
51
|
+
ClientEvent | Hash[String | Symbol, untyped] event
|
|
52
|
+
) -> void
|
|
53
|
+
def each: -> Enumerator[Elem, self] | { (Elem) -> void } -> self
|
|
37
54
|
def close: (?code: Integer, ?reason: String) -> void
|
|
38
55
|
def closed?: -> bool
|
|
39
56
|
end
|
|
@@ -60,13 +60,14 @@ module OpenAI
|
|
|
60
60
|
def self?.variants: -> ::Array[OpenAI::Models::Admin::Organization::ExternalStorageConfiguration::provider]
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
type status = :pending | :validated | :unhealthy
|
|
63
|
+
type status = :pending | :validated | :degraded | :unhealthy
|
|
64
64
|
|
|
65
65
|
module Status
|
|
66
66
|
extend OpenAI::Internal::Type::Enum
|
|
67
67
|
|
|
68
68
|
PENDING: :pending
|
|
69
69
|
VALIDATED: :validated
|
|
70
|
+
DEGRADED: :degraded
|
|
70
71
|
UNHEALTHY: :unhealthy
|
|
71
72
|
|
|
72
73
|
def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::ExternalStorageConfiguration::status]
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|
|
@@ -75,6 +75,7 @@ module OpenAI
|
|
|
75
75
|
?batch: bool?,
|
|
76
76
|
?input_audio_tokens: Integer?,
|
|
77
77
|
?:input_cache_write_12h_tokens => Integer?,
|
|
78
|
+
?:input_cache_write_30m_tokens => Integer?,
|
|
78
79
|
?input_cache_write_tokens: Integer?,
|
|
79
80
|
?input_cached_audio_tokens: Integer?,
|
|
80
81
|
?input_cached_image_tokens: Integer?,
|
|
@@ -129,6 +130,10 @@ module OpenAI
|
|
|
129
130
|
# retention period.
|
|
130
131
|
attr_accessor input_cache_write_12h_tokens: Integer?
|
|
131
132
|
|
|
133
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
134
|
+
# retention period.
|
|
135
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
136
|
+
|
|
132
137
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
133
138
|
# retention period.
|
|
134
139
|
attr_accessor input_cache_write_tokens: Integer?
|
|
@@ -208,6 +213,9 @@ module OpenAI
|
|
|
208
213
|
# @param input_cache_write_12h_tokens
|
|
209
214
|
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
210
215
|
# retention period.
|
|
216
|
+
# @param input_cache_write_30m_tokens
|
|
217
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
218
|
+
# retention period.
|
|
211
219
|
# @param input_cache_write_tokens
|
|
212
220
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
213
221
|
# retention period.
|
|
@@ -255,6 +263,7 @@ module OpenAI
|
|
|
255
263
|
?batch: bool?,
|
|
256
264
|
?input_audio_tokens: Integer?,
|
|
257
265
|
?input_cache_write_12h_tokens: Integer?,
|
|
266
|
+
?input_cache_write_30m_tokens: Integer?,
|
|
258
267
|
?input_cache_write_tokens: Integer?,
|
|
259
268
|
?input_cached_audio_tokens: Integer?,
|
|
260
269
|
?input_cached_image_tokens: Integer?,
|
|
@@ -283,6 +292,7 @@ module OpenAI
|
|
|
283
292
|
?batch: bool?,
|
|
284
293
|
?input_audio_tokens: Integer?,
|
|
285
294
|
?:input_cache_write_12h_tokens => Integer?,
|
|
295
|
+
?:input_cache_write_30m_tokens => Integer?,
|
|
286
296
|
?input_cache_write_tokens: Integer?,
|
|
287
297
|
?input_cached_audio_tokens: Integer?,
|
|
288
298
|
?input_cached_image_tokens: Integer?,
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -152,6 +153,10 @@ module OpenAI
|
|
|
152
153
|
# retention period.
|
|
153
154
|
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
155
|
|
|
156
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
157
|
+
# retention period. May be absent or null for older responses.
|
|
158
|
+
attr_accessor input_cache_write_30m_tokens: Integer?
|
|
159
|
+
|
|
155
160
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
161
|
# retention period.
|
|
157
162
|
attr_reader input_cache_write_tokens: Integer?
|
|
@@ -268,6 +273,9 @@ 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.
|
|
276
|
+
# @param input_cache_write_30m_tokens
|
|
277
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
278
|
+
# retention period. May be absent or null for older responses.
|
|
271
279
|
# @param input_cache_write_tokens
|
|
272
280
|
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
281
|
# retention period.
|
|
@@ -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,
|