openai 0.117.0 → 0.118.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 +13 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/projects/project_optional_service_tier.rb +24 -0
- data/lib/openai/models/admin/organization/projects/project_service_tier_settings.rb +88 -0
- data/lib/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rb +29 -0
- data/lib/openai/models/admin/organization/projects/service_tier_setting_update_params.rb +92 -0
- data/lib/openai/models/beta/beta_response.rb +1 -0
- data/lib/openai/models/beta/beta_response_usage.rb +33 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +10 -9
- data/lib/openai/models/beta/response_compact_params.rb +3 -3
- data/lib/openai/models/beta/response_create_params.rb +10 -9
- data/lib/openai/models/chat/completion_create_params.rb +3 -3
- data/lib/openai/models/responses/response.rb +1 -0
- data/lib/openai/models/responses/response_compact_params.rb +3 -3
- data/lib/openai/models/responses/response_create_params.rb +10 -9
- data/lib/openai/models/responses/response_usage.rb +33 -1
- data/lib/openai/models/responses/responses_client_event.rb +10 -9
- data/lib/openai/resources/admin/organization/projects/service_tier_settings.rb +77 -0
- data/lib/openai/resources/admin/organization/projects.rb +6 -0
- data/lib/openai/resources/beta/responses.rb +6 -6
- data/lib/openai/resources/chat/completions.rb +2 -2
- data/lib/openai/resources/responses.rb +3 -3
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +5 -0
- data/rbi/openai/models/admin/organization/projects/project_optional_service_tier.rbi +45 -0
- data/rbi/openai/models/admin/organization/projects/project_service_tier_settings.rbi +143 -0
- data/rbi/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbi +63 -0
- data/rbi/openai/models/admin/organization/projects/service_tier_setting_update_params.rbi +183 -0
- data/rbi/openai/models/beta/beta_response.rbi +1 -0
- data/rbi/openai/models/beta/beta_response_usage.rbi +66 -3
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +13 -9
- data/rbi/openai/models/beta/response_compact_params.rbi +3 -3
- data/rbi/openai/models/beta/response_create_params.rbi +10 -9
- data/rbi/openai/models/chat/completion_create_params.rbi +3 -3
- data/rbi/openai/models/responses/response.rbi +1 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +3 -3
- data/rbi/openai/models/responses/response_create_params.rbi +10 -9
- data/rbi/openai/models/responses/response_usage.rbi +66 -3
- data/rbi/openai/models/responses/responses_client_event.rbi +13 -9
- data/rbi/openai/resources/admin/organization/projects/service_tier_settings.rbi +67 -0
- data/rbi/openai/resources/admin/organization/projects.rbi +3 -0
- data/rbi/openai/resources/beta/responses.rbi +6 -6
- data/rbi/openai/resources/chat/completions.rbi +2 -2
- data/rbi/openai/resources/responses.rbi +3 -3
- data/sig/openai/models/admin/organization/projects/project_optional_service_tier.rbs +23 -0
- data/sig/openai/models/admin/organization/projects/project_service_tier_settings.rbs +72 -0
- data/sig/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbs +32 -0
- data/sig/openai/models/admin/organization/projects/service_tier_setting_update_params.rbs +91 -0
- data/sig/openai/models/beta/beta_response.rbs +2 -1
- data/sig/openai/models/beta/beta_response_usage.rbs +40 -3
- data/sig/openai/models/beta/beta_responses_client_event.rbs +11 -10
- data/sig/openai/models/beta/response_compact_params.rbs +2 -2
- data/sig/openai/models/beta/response_create_params.rbs +11 -10
- data/sig/openai/models/chat/completion_create_params.rbs +3 -3
- data/sig/openai/models/responses/response.rbs +2 -1
- data/sig/openai/models/responses/response_compact_params.rbs +2 -2
- data/sig/openai/models/responses/response_create_params.rbs +11 -10
- data/sig/openai/models/responses/response_usage.rbs +40 -3
- data/sig/openai/models/responses/responses_client_event.rbs +11 -10
- data/sig/openai/resources/admin/organization/projects/service_tier_settings.rbs +25 -0
- data/sig/openai/resources/admin/organization/projects.rbs +2 -0
- metadata +16 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Admin
|
|
7
|
+
|
|
8
|
+
module Organization
|
|
9
|
+
|
|
10
|
+
module Projects
|
|
11
|
+
|
|
12
|
+
class ServiceTierSettingUpdateParams < OpenAI::Internal::Type::BaseModel
|
|
13
|
+
|
|
14
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
OrHash = T.type_alias do
|
|
18
|
+
T.any(
|
|
19
|
+
OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams,
|
|
20
|
+
OpenAI::Internal::AnyHash
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# The ID of the project
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
attr_accessor :project_id
|
|
27
|
+
|
|
28
|
+
# Default tier for requests that omit service_tier or use auto.
|
|
29
|
+
sig {
|
|
30
|
+
returns(
|
|
31
|
+
T.nilable(OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default::OrSymbol)
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
attr_reader :default
|
|
35
|
+
|
|
36
|
+
sig {
|
|
37
|
+
params(default: OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default::OrSymbol)
|
|
38
|
+
.void
|
|
39
|
+
}
|
|
40
|
+
attr_writer :default
|
|
41
|
+
|
|
42
|
+
# Additional service tiers enabled for this project. "all" includes future tiers.
|
|
43
|
+
# An empty array allows only Standard. Organization policy and eligibility still
|
|
44
|
+
# apply.
|
|
45
|
+
sig {
|
|
46
|
+
returns(
|
|
47
|
+
T.nilable(
|
|
48
|
+
T.any(Symbol, T::Array[OpenAI::Admin::Organization::Projects::ProjectOptionalServiceTier::OrSymbol])
|
|
49
|
+
)
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
attr_reader :enabled_tiers
|
|
53
|
+
|
|
54
|
+
sig {
|
|
55
|
+
params(
|
|
56
|
+
enabled_tiers: T.any(
|
|
57
|
+
Symbol,
|
|
58
|
+
T::Array[OpenAI::Admin::Organization::Projects::ProjectOptionalServiceTier::OrSymbol]
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
.void
|
|
62
|
+
}
|
|
63
|
+
attr_writer :enabled_tiers
|
|
64
|
+
|
|
65
|
+
sig do
|
|
66
|
+
params(
|
|
67
|
+
|
|
68
|
+
project_id: String,
|
|
69
|
+
|
|
70
|
+
default: OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default::OrSymbol,
|
|
71
|
+
|
|
72
|
+
enabled_tiers: T.any(
|
|
73
|
+
Symbol,
|
|
74
|
+
T::Array[OpenAI::Admin::Organization::Projects::ProjectOptionalServiceTier::OrSymbol]
|
|
75
|
+
),
|
|
76
|
+
|
|
77
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
78
|
+
)
|
|
79
|
+
.returns(T.attached_class)
|
|
80
|
+
end
|
|
81
|
+
def self.new(
|
|
82
|
+
|
|
83
|
+
# The ID of the project
|
|
84
|
+
project_id:,
|
|
85
|
+
|
|
86
|
+
# Default tier for requests that omit service_tier or use auto.
|
|
87
|
+
default: nil,
|
|
88
|
+
|
|
89
|
+
# Additional service tiers enabled for this project. "all" includes future tiers.
|
|
90
|
+
# An empty array allows only Standard. Organization policy and eligibility still
|
|
91
|
+
# apply.
|
|
92
|
+
enabled_tiers: nil,
|
|
93
|
+
|
|
94
|
+
request_options: {}
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
sig do
|
|
99
|
+
override.returns(
|
|
100
|
+
{
|
|
101
|
+
project_id: String,
|
|
102
|
+
default: OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default::OrSymbol,
|
|
103
|
+
enabled_tiers: T.any(
|
|
104
|
+
Symbol,
|
|
105
|
+
T::Array[OpenAI::Admin::Organization::Projects::ProjectOptionalServiceTier::OrSymbol]
|
|
106
|
+
),
|
|
107
|
+
request_options: OpenAI::RequestOptions
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
def to_hash
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Default tier for requests that omit service_tier or use auto.
|
|
115
|
+
module Default
|
|
116
|
+
extend OpenAI::Internal::Type::Enum
|
|
117
|
+
|
|
118
|
+
TaggedSymbol = T.type_alias {
|
|
119
|
+
T.all(Symbol, OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default)
|
|
120
|
+
}
|
|
121
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
122
|
+
|
|
123
|
+
STANDARD = T.let(
|
|
124
|
+
:standard,
|
|
125
|
+
OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default::TaggedSymbol
|
|
126
|
+
)
|
|
127
|
+
FAST = T.let(
|
|
128
|
+
:fast,
|
|
129
|
+
OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default::TaggedSymbol
|
|
130
|
+
)
|
|
131
|
+
SCALE = T.let(
|
|
132
|
+
:scale,
|
|
133
|
+
OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default::TaggedSymbol
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
sig {
|
|
137
|
+
override.returns(
|
|
138
|
+
T::Array[OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default::TaggedSymbol]
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
def self.values
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Additional service tiers enabled for this project. "all" includes future tiers.
|
|
146
|
+
# An empty array allows only Standard. Organization policy and eligibility still
|
|
147
|
+
# apply.
|
|
148
|
+
module EnabledTiers
|
|
149
|
+
extend OpenAI::Internal::Type::Union
|
|
150
|
+
|
|
151
|
+
Variants = T.type_alias {
|
|
152
|
+
T.any(Symbol, T::Array[OpenAI::Admin::Organization::Projects::ProjectOptionalServiceTier::TaggedSymbol])
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
sig {
|
|
156
|
+
override.returns(
|
|
157
|
+
T::Array[
|
|
158
|
+
OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::EnabledTiers::Variants
|
|
159
|
+
]
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
def self.variants
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
ProjectOptionalServiceTierArray = T.let(
|
|
166
|
+
OpenAI::Internal::Type::ArrayOf[
|
|
167
|
+
enum: -> { OpenAI::Models::Admin::Organization::Projects::ProjectOptionalServiceTier }
|
|
168
|
+
],
|
|
169
|
+
OpenAI::Internal::Type::Converter
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
end
|
|
183
|
+
end
|
|
@@ -2027,6 +2027,7 @@ module OpenAI
|
|
|
2027
2027
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2028
2028
|
|
|
2029
2029
|
TTL_30M = T.let(:"30m", OpenAI::Beta::BetaResponse::PromptCacheOptions::Ttl::TaggedSymbol)
|
|
2030
|
+
TTL_12H = T.let(:"12h", OpenAI::Beta::BetaResponse::PromptCacheOptions::Ttl::TaggedSymbol)
|
|
2030
2031
|
|
|
2031
2032
|
sig { override.returns(T::Array[OpenAI::Beta::BetaResponse::PromptCacheOptions::Ttl::TaggedSymbol]) }
|
|
2032
2033
|
def self.values
|
|
@@ -110,13 +110,26 @@ module OpenAI
|
|
|
110
110
|
sig { returns(Integer) }
|
|
111
111
|
attr_accessor :cached_tokens
|
|
112
112
|
|
|
113
|
+
sig { returns(T.nilable(OpenAI::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails)) }
|
|
114
|
+
attr_reader :cache_write_tokens_details
|
|
115
|
+
|
|
116
|
+
sig {
|
|
117
|
+
params(
|
|
118
|
+
cache_write_tokens_details: OpenAI::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails::OrHash
|
|
119
|
+
)
|
|
120
|
+
.void
|
|
121
|
+
}
|
|
122
|
+
attr_writer :cache_write_tokens_details
|
|
123
|
+
|
|
113
124
|
# A detailed breakdown of the input tokens.
|
|
114
125
|
sig do
|
|
115
126
|
params(
|
|
116
127
|
|
|
117
128
|
cache_write_tokens: Integer,
|
|
118
129
|
|
|
119
|
-
cached_tokens: Integer
|
|
130
|
+
cached_tokens: Integer,
|
|
131
|
+
|
|
132
|
+
cache_write_tokens_details: OpenAI::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails::OrHash
|
|
120
133
|
)
|
|
121
134
|
.returns(T.attached_class)
|
|
122
135
|
end
|
|
@@ -127,19 +140,69 @@ module OpenAI
|
|
|
127
140
|
|
|
128
141
|
# The number of tokens that were retrieved from the cache.
|
|
129
142
|
# [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
143
|
+
cached_tokens:,
|
|
130
144
|
|
|
131
|
-
|
|
145
|
+
cache_write_tokens_details: nil
|
|
132
146
|
)
|
|
133
147
|
end
|
|
134
148
|
|
|
135
149
|
sig do
|
|
136
150
|
override.returns(
|
|
137
|
-
{
|
|
151
|
+
{
|
|
152
|
+
cache_write_tokens: Integer,
|
|
153
|
+
cached_tokens: Integer,
|
|
154
|
+
cache_write_tokens_details: OpenAI::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails
|
|
155
|
+
}
|
|
138
156
|
)
|
|
139
157
|
end
|
|
140
158
|
def to_hash
|
|
141
159
|
end
|
|
142
160
|
|
|
161
|
+
class CacheWriteTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
162
|
+
OrHash = T.type_alias do
|
|
163
|
+
T.any(
|
|
164
|
+
OpenAI::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails,
|
|
165
|
+
OpenAI::Internal::AnyHash
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# The number of input tokens written with 12-hour retention.
|
|
170
|
+
sig { returns(Integer) }
|
|
171
|
+
attr_accessor :ttl_12h_tokens
|
|
172
|
+
|
|
173
|
+
# The number of input tokens written with 30-minute retention.
|
|
174
|
+
sig { returns(Integer) }
|
|
175
|
+
attr_accessor :ttl_30m_tokens
|
|
176
|
+
|
|
177
|
+
sig do
|
|
178
|
+
params(
|
|
179
|
+
|
|
180
|
+
ttl_12h_tokens: Integer,
|
|
181
|
+
|
|
182
|
+
ttl_30m_tokens: Integer
|
|
183
|
+
)
|
|
184
|
+
.returns(T.attached_class)
|
|
185
|
+
end
|
|
186
|
+
def self.new(
|
|
187
|
+
|
|
188
|
+
# The number of input tokens written with 12-hour retention.
|
|
189
|
+
ttl_12h_tokens:,
|
|
190
|
+
|
|
191
|
+
# The number of input tokens written with 30-minute retention.
|
|
192
|
+
|
|
193
|
+
ttl_30m_tokens:
|
|
194
|
+
)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
sig do
|
|
198
|
+
override.returns(
|
|
199
|
+
{ttl_12h_tokens: Integer, ttl_30m_tokens: Integer}
|
|
200
|
+
)
|
|
201
|
+
end
|
|
202
|
+
def to_hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
end
|
|
143
206
|
end
|
|
144
207
|
|
|
145
208
|
class OutputTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
@@ -199,7 +199,7 @@ module OpenAI
|
|
|
199
199
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
200
200
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
201
201
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
202
|
-
# `ttl` defaults to `30m
|
|
202
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
203
203
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
204
204
|
# for current details.
|
|
205
205
|
sig { returns(T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions)) }
|
|
@@ -726,7 +726,7 @@ module OpenAI
|
|
|
726
726
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
727
727
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
728
728
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
729
|
-
# `ttl` defaults to `30m
|
|
729
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
730
730
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
731
731
|
# for current details.
|
|
732
732
|
prompt_cache_options: nil,
|
|
@@ -1956,8 +1956,8 @@ module OpenAI
|
|
|
1956
1956
|
attr_writer :prewarm
|
|
1957
1957
|
|
|
1958
1958
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1959
|
-
# written by the request.
|
|
1960
|
-
#
|
|
1959
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1960
|
+
# backend may retain cache entries for longer.
|
|
1961
1961
|
sig {
|
|
1962
1962
|
returns(
|
|
1963
1963
|
T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::OrSymbol)
|
|
@@ -1977,7 +1977,7 @@ module OpenAI
|
|
|
1977
1977
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
1978
1978
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
1979
1979
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
1980
|
-
# `ttl` defaults to `30m
|
|
1980
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
1981
1981
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
1982
1982
|
# for current details.
|
|
1983
1983
|
sig do
|
|
@@ -2012,8 +2012,8 @@ module OpenAI
|
|
|
2012
2012
|
prewarm: nil,
|
|
2013
2013
|
|
|
2014
2014
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
2015
|
-
# written by the request.
|
|
2016
|
-
#
|
|
2015
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
2016
|
+
# backend may retain cache entries for longer.
|
|
2017
2017
|
|
|
2018
2018
|
ttl: nil
|
|
2019
2019
|
)
|
|
@@ -2071,8 +2071,8 @@ module OpenAI
|
|
|
2071
2071
|
end
|
|
2072
2072
|
|
|
2073
2073
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
2074
|
-
# written by the request.
|
|
2075
|
-
#
|
|
2074
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
2075
|
+
# backend may retain cache entries for longer.
|
|
2076
2076
|
module Ttl
|
|
2077
2077
|
extend OpenAI::Internal::Type::Enum
|
|
2078
2078
|
|
|
@@ -2085,6 +2085,10 @@ module OpenAI
|
|
|
2085
2085
|
:"30m",
|
|
2086
2086
|
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::TaggedSymbol
|
|
2087
2087
|
)
|
|
2088
|
+
TTL_12H = T.let(
|
|
2089
|
+
:"12h",
|
|
2090
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::TaggedSymbol
|
|
2091
|
+
)
|
|
2088
2092
|
|
|
2089
2093
|
sig {
|
|
2090
2094
|
override.returns(
|
|
@@ -53,7 +53,7 @@ module OpenAI
|
|
|
53
53
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
54
54
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
55
55
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
56
|
-
# `ttl` defaults to `30m
|
|
56
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
57
57
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
58
58
|
# for current details.
|
|
59
59
|
sig { returns(T.nilable(OpenAI::Beta::ResponseCompactParams::PromptCacheOptions)) }
|
|
@@ -151,7 +151,7 @@ module OpenAI
|
|
|
151
151
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
152
152
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
153
153
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
154
|
-
# `ttl` defaults to `30m
|
|
154
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
155
155
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
156
156
|
# for current details.
|
|
157
157
|
prompt_cache_options: nil,
|
|
@@ -486,7 +486,7 @@ module OpenAI
|
|
|
486
486
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
487
487
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
488
488
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
489
|
-
# `ttl` defaults to `30m
|
|
489
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
490
490
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
491
491
|
# for current details.
|
|
492
492
|
sig do
|
|
@@ -162,7 +162,7 @@ module OpenAI
|
|
|
162
162
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
163
163
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
164
164
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
165
|
-
# `ttl` defaults to `30m
|
|
165
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
166
166
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
167
167
|
# for current details.
|
|
168
168
|
sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::PromptCacheOptions)) }
|
|
@@ -639,7 +639,7 @@ module OpenAI
|
|
|
639
639
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
640
640
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
641
641
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
642
|
-
# `ttl` defaults to `30m
|
|
642
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
643
643
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
644
644
|
# for current details.
|
|
645
645
|
prompt_cache_options: nil,
|
|
@@ -1563,8 +1563,8 @@ module OpenAI
|
|
|
1563
1563
|
attr_writer :prewarm
|
|
1564
1564
|
|
|
1565
1565
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1566
|
-
# written by the request.
|
|
1567
|
-
#
|
|
1566
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1567
|
+
# backend may retain cache entries for longer.
|
|
1568
1568
|
sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::Ttl::OrSymbol)) }
|
|
1569
1569
|
attr_reader :ttl
|
|
1570
1570
|
|
|
@@ -1577,7 +1577,7 @@ module OpenAI
|
|
|
1577
1577
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
1578
1578
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
1579
1579
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
1580
|
-
# `ttl` defaults to `30m
|
|
1580
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
1581
1581
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
1582
1582
|
# for current details.
|
|
1583
1583
|
sig do
|
|
@@ -1612,8 +1612,8 @@ module OpenAI
|
|
|
1612
1612
|
prewarm: nil,
|
|
1613
1613
|
|
|
1614
1614
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1615
|
-
# written by the request.
|
|
1616
|
-
#
|
|
1615
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1616
|
+
# backend may retain cache entries for longer.
|
|
1617
1617
|
|
|
1618
1618
|
ttl: nil
|
|
1619
1619
|
)
|
|
@@ -1655,8 +1655,8 @@ module OpenAI
|
|
|
1655
1655
|
end
|
|
1656
1656
|
|
|
1657
1657
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1658
|
-
# written by the request.
|
|
1659
|
-
#
|
|
1658
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1659
|
+
# backend may retain cache entries for longer.
|
|
1660
1660
|
module Ttl
|
|
1661
1661
|
extend OpenAI::Internal::Type::Enum
|
|
1662
1662
|
|
|
@@ -1664,6 +1664,7 @@ module OpenAI
|
|
|
1664
1664
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1665
1665
|
|
|
1666
1666
|
TTL_30M = T.let(:"30m", OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::Ttl::TaggedSymbol)
|
|
1667
|
+
TTL_12H = T.let(:"12h", OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::Ttl::TaggedSymbol)
|
|
1667
1668
|
|
|
1668
1669
|
sig {
|
|
1669
1670
|
override.returns(T::Array[OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::Ttl::TaggedSymbol])
|
|
@@ -214,7 +214,7 @@ module OpenAI
|
|
|
214
214
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
215
215
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
216
216
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
217
|
-
# `ttl` defaults to `30m
|
|
217
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
218
218
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
219
219
|
# for current details.
|
|
220
220
|
sig { returns(T.nilable(OpenAI::Chat::CompletionCreateParams::PromptCacheOptions)) }
|
|
@@ -704,7 +704,7 @@ module OpenAI
|
|
|
704
704
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
705
705
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
706
706
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
707
|
-
# `ttl` defaults to `30m
|
|
707
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
708
708
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
709
709
|
# for current details.
|
|
710
710
|
prompt_cache_options: nil,
|
|
@@ -1359,7 +1359,7 @@ module OpenAI
|
|
|
1359
1359
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
1360
1360
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
1361
1361
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
1362
|
-
# `ttl` defaults to `30m
|
|
1362
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
1363
1363
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
1364
1364
|
# for current details.
|
|
1365
1365
|
sig do
|
|
@@ -1856,6 +1856,7 @@ module OpenAI
|
|
|
1856
1856
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1857
1857
|
|
|
1858
1858
|
TTL_30M = T.let(:"30m", OpenAI::Responses::Response::PromptCacheOptions::Ttl::TaggedSymbol)
|
|
1859
|
+
TTL_12H = T.let(:"12h", OpenAI::Responses::Response::PromptCacheOptions::Ttl::TaggedSymbol)
|
|
1859
1860
|
|
|
1860
1861
|
sig { override.returns(T::Array[OpenAI::Responses::Response::PromptCacheOptions::Ttl::TaggedSymbol]) }
|
|
1861
1862
|
def self.values
|
|
@@ -53,7 +53,7 @@ module OpenAI
|
|
|
53
53
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
54
54
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
55
55
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
56
|
-
# `ttl` defaults to `30m
|
|
56
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
57
57
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
58
58
|
# for current details.
|
|
59
59
|
sig { returns(T.nilable(OpenAI::Responses::ResponseCompactParams::PromptCacheOptions)) }
|
|
@@ -144,7 +144,7 @@ module OpenAI
|
|
|
144
144
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
145
145
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
146
146
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
147
|
-
# `ttl` defaults to `30m
|
|
147
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
148
148
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
149
149
|
# for current details.
|
|
150
150
|
prompt_cache_options: nil,
|
|
@@ -529,7 +529,7 @@ module OpenAI
|
|
|
529
529
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
530
530
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
531
531
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
532
|
-
# `ttl` defaults to `30m
|
|
532
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
533
533
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
534
534
|
# for current details.
|
|
535
535
|
sig do
|
|
@@ -164,7 +164,7 @@ module OpenAI
|
|
|
164
164
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
165
165
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
166
166
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
167
|
-
# `ttl` defaults to `30m
|
|
167
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
168
168
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
169
169
|
# for current details.
|
|
170
170
|
sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::PromptCacheOptions)) }
|
|
@@ -633,7 +633,7 @@ module OpenAI
|
|
|
633
633
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
634
634
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
635
635
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
636
|
-
# `ttl` defaults to `30m
|
|
636
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
637
637
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
638
638
|
# for current details.
|
|
639
639
|
prompt_cache_options: nil,
|
|
@@ -1287,8 +1287,8 @@ module OpenAI
|
|
|
1287
1287
|
attr_writer :prewarm
|
|
1288
1288
|
|
|
1289
1289
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1290
|
-
# written by the request.
|
|
1291
|
-
#
|
|
1290
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1291
|
+
# backend may retain cache entries for longer.
|
|
1292
1292
|
sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::PromptCacheOptions::Ttl::OrSymbol)) }
|
|
1293
1293
|
attr_reader :ttl
|
|
1294
1294
|
|
|
@@ -1301,7 +1301,7 @@ module OpenAI
|
|
|
1301
1301
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
1302
1302
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
1303
1303
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
1304
|
-
# `ttl` defaults to `30m
|
|
1304
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
1305
1305
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
1306
1306
|
# for current details.
|
|
1307
1307
|
sig do
|
|
@@ -1336,8 +1336,8 @@ module OpenAI
|
|
|
1336
1336
|
prewarm: nil,
|
|
1337
1337
|
|
|
1338
1338
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1339
|
-
# written by the request.
|
|
1340
|
-
#
|
|
1339
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1340
|
+
# backend may retain cache entries for longer.
|
|
1341
1341
|
|
|
1342
1342
|
ttl: nil
|
|
1343
1343
|
)
|
|
@@ -1383,8 +1383,8 @@ module OpenAI
|
|
|
1383
1383
|
end
|
|
1384
1384
|
|
|
1385
1385
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1386
|
-
# written by the request.
|
|
1387
|
-
#
|
|
1386
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1387
|
+
# backend may retain cache entries for longer.
|
|
1388
1388
|
module Ttl
|
|
1389
1389
|
extend OpenAI::Internal::Type::Enum
|
|
1390
1390
|
|
|
@@ -1394,6 +1394,7 @@ module OpenAI
|
|
|
1394
1394
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1395
1395
|
|
|
1396
1396
|
TTL_30M = T.let(:"30m", OpenAI::Responses::ResponseCreateParams::PromptCacheOptions::Ttl::TaggedSymbol)
|
|
1397
|
+
TTL_12H = T.let(:"12h", OpenAI::Responses::ResponseCreateParams::PromptCacheOptions::Ttl::TaggedSymbol)
|
|
1397
1398
|
|
|
1398
1399
|
sig {
|
|
1399
1400
|
override.returns(T::Array[OpenAI::Responses::ResponseCreateParams::PromptCacheOptions::Ttl::TaggedSymbol])
|