Class: OpenAI::Models::Beta::ResponseCompactParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::ResponseCompactParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/openai/models/beta/response_compact_params.rb,
sig/openai/models/beta/response_compact_params.rbs
Overview
Defined Under Namespace
Modules: Beta, Input, Model, PromptCacheRetention, ServiceTier Classes: Image, PromptCacheOptions
Instance Attribute Summary collapse
- #betas ⇒ Array<Symbol, OpenAI::Models::Beta::ResponseCompactParams::Beta>?
-
#image ⇒ OpenAI::Beta::ResponseCompactParams::Image?
Request level image options.
-
#input ⇒ OpenAI::Models::Beta::ResponseCompactParams::input?
Text, image, or file inputs to the model, used to generate a response.
-
#instructions ⇒ String?
A system (or developer) message inserted into the model's context.
-
#model ⇒ OpenAI::Models::Beta::ResponseCompactParams::model?
Model ID used to generate the response, like
gpt-6.2-astra. -
#previous_response_id ⇒ String?
The unique ID of the previous response to the model.
-
#prompt_cache_key ⇒ String?
A key to use when reading from or writing to the prompt cache.
-
#prompt_cache_options ⇒ OpenAI::Beta::ResponseCompactParams::PromptCacheOptions?
Options for prompt caching.
-
#prompt_cache_retention ⇒ OpenAI::Models::Beta::ResponseCompactParams::prompt_cache_retention?
How long to retain a prompt cache entry created by this request.
-
#safety_identifier ⇒ String?
A stable identifier used for safety monitoring and abuse detection.
-
#service_tier ⇒ OpenAI::Models::Beta::ResponseCompactParams::service_tier?
Specifies the processing type used for serving the request.
Attributes included from Internal::Type::RequestParameters
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(model:, image: nil, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, safety_identifier: nil, service_tier: nil, betas: nil, request_options: {}) ⇒ ResponseCompactParams
constructor
A new instance of ResponseCompactParams.
- #to_hash ⇒ { model: OpenAI::Models::Beta::ResponseCompactParams::model?, ?image: OpenAI::Beta::ResponseCompactParams::Image, ?input: OpenAI::Models::Beta::ResponseCompactParams::input?, ?instructions: String?, ?previous_response_id: String?, ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Beta::ResponseCompactParams::PromptCacheOptions?, ?prompt_cache_retention: OpenAI::Models::Beta::ResponseCompactParams::prompt_cache_retention?, ?safety_identifier: String?, ?service_tier: OpenAI::Models::Beta::ResponseCompactParams::service_tier?, ?betas: ::Array[OpenAI::Models::Beta::ResponseCompactParams::beta], ?request_options: OpenAI::RequestOptions }
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(model:, image: nil, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, safety_identifier: nil, service_tier: nil, betas: nil, request_options: {}) ⇒ ResponseCompactParams
Returns a new instance of ResponseCompactParams.
|
|
# File 'lib/openai/models/beta/response_compact_params.rb', line 123
|
Instance Attribute Details
#betas ⇒ Array<Symbol, OpenAI::Models::Beta::ResponseCompactParams::Beta>?
121 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 121 optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseCompactParams::Beta] } |
#image ⇒ OpenAI::Beta::ResponseCompactParams::Image?
Request level image options.
25 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 25 optional :image, -> { OpenAI::Beta::ResponseCompactParams::Image } |
#input ⇒ OpenAI::Models::Beta::ResponseCompactParams::input?
Text, image, or file inputs to the model, used to generate a response
31 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 31 optional :input, union: -> { OpenAI::Beta::ResponseCompactParams::Input }, nil?: true |
#instructions ⇒ String?
A system (or developer) message inserted into the model's context. When used
along with previous_response_id, the instructions from a previous response
will not be carried over to the next response. This makes it simple to swap out
system (or developer) messages in new responses.
42 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 42 optional :instructions, String, nil?: true |
#model ⇒ OpenAI::Models::Beta::ResponseCompactParams::model?
Model ID used to generate the response, like gpt-6.2-astra. OpenAI offers a
wide range of models with different capabilities, performance characteristics,
and price points. Refer to the
model guide to browse and
compare available models.
19 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 19 required :model, union: -> { OpenAI::Beta::ResponseCompactParams::Model }, nil?: true |
#previous_response_id ⇒ String?
The unique ID of the previous response to the model. Use this to create
multi-turn conversations. Learn more about
conversation state.
Cannot be used in conjunction with conversation.
51 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 51 optional :previous_response_id, String, nil?: true |
#prompt_cache_key ⇒ String?
A key to use when reading from or writing to the prompt cache.
57 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 57 optional :prompt_cache_key, String, nil?: true |
#prompt_cache_options ⇒ OpenAI::Beta::ResponseCompactParams::PromptCacheOptions?
Options for prompt caching. Supported for gpt-5.6 and later models. By
default, OpenAI automatically chooses one implicit cache breakpoint. You can add
explicit breakpoints to content blocks with prompt_cache_breakpoint. Each
request can write up to four breakpoints. For cache matching, OpenAI considers
up to the latest 80 breakpoints in the conversation, without a content-block
lookback limit. Set mode to explicit to disable the implicit breakpoint. The
ttl defaults to 30m. Supported lifetimes depend on the API. See the
prompt caching guide
for current details.
71 72 73 74 75 76 77 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 71 optional( :prompt_cache_options, -> { OpenAI::Beta::ResponseCompactParams::PromptCacheOptions }, nil?: true ) |
#prompt_cache_retention ⇒ OpenAI::Models::Beta::ResponseCompactParams::prompt_cache_retention?
How long to retain a prompt cache entry created by this request.
85 86 87 88 89 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 85 optional( :prompt_cache_retention, enum: -> { OpenAI::Beta::ResponseCompactParams::PromptCacheRetention }, nil?: true ) |
#safety_identifier ⇒ String?
A stable identifier used for safety monitoring and abuse detection.
95 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 95 optional :safety_identifier, String, nil?: true |
#service_tier ⇒ OpenAI::Models::Beta::ResponseCompactParams::service_tier?
Specifies the processing type used for serving the request. - If set to 'auto',
then the request will be processed with the service tier configured in the
Project settings. Unless otherwise configured, the Project will use 'default'. -
If set to 'default', then the request will be processed with the standard
pricing and performance for the selected model. - If set to
'flex', then
the request will be processed with the Flex Processing service tier. - To opt-in
to Fast mode at the
request level, include the service_tier=fast or service_tier=priority
parameter for Responses or Chat Completions. For models with a dedicated Fast
tier, either value resolves to service_tier=fast; for other models, either
value resolves to service_tier=priority. - When not set, the default behavior
is 'auto'. When the service_tier parameter is set, the response body will
include the service_tier value based on the processing mode actually used to
serve the request. This response value may be different from the value set in
the parameter.
116 |
# File 'lib/openai/models/beta/response_compact_params.rb', line 116 optional :service_tier, enum: -> { OpenAI::Beta::ResponseCompactParams::ServiceTier }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/beta/response_compact_params.rb', line 845
|
Instance Method Details
#to_hash ⇒ { model: OpenAI::Models::Beta::ResponseCompactParams::model?, ?image: OpenAI::Beta::ResponseCompactParams::Image, ?input: OpenAI::Models::Beta::ResponseCompactParams::input?, ?instructions: String?, ?previous_response_id: String?, ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Beta::ResponseCompactParams::PromptCacheOptions?, ?prompt_cache_retention: OpenAI::Models::Beta::ResponseCompactParams::prompt_cache_retention?, ?safety_identifier: String?, ?service_tier: OpenAI::Models::Beta::ResponseCompactParams::service_tier?, ?betas: ::Array[OpenAI::Models::Beta::ResponseCompactParams::beta], ?request_options: OpenAI::RequestOptions }
166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'sig/openai/models/beta/response_compact_params.rbs', line 166
def to_hash: -> {
model: OpenAI::Models::Beta::ResponseCompactParams::model?,
?image: OpenAI::Beta::ResponseCompactParams::Image,
?input: OpenAI::Models::Beta::ResponseCompactParams::input?,
?instructions: String?,
?previous_response_id: String?,
?prompt_cache_key: String?,
?prompt_cache_options: OpenAI::Beta::ResponseCompactParams::PromptCacheOptions?,
?prompt_cache_retention: OpenAI::Models::Beta::ResponseCompactParams::prompt_cache_retention?,
?safety_identifier: String?,
?service_tier: OpenAI::Models::Beta::ResponseCompactParams::service_tier?,
?betas: ::Array[OpenAI::Models::Beta::ResponseCompactParams::beta],
?request_options: OpenAI::RequestOptions
}
|