Class: OpenAI::Models::Responses::ResponseCompactParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Responses::ResponseCompactParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/openai/models/responses/response_compact_params.rb,
sig/openai/models/responses/response_compact_params.rbs
Overview
Defined Under Namespace
Modules: Input, Model, PromptCacheRetention, ServiceTier Classes: PromptCacheOptions
Instance Attribute Summary collapse
-
#input ⇒ String, ...
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 ⇒ Symbol, ...
Model ID used to generate the response, like
gpt-5oro3. -
#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::Models::Responses::ResponseCompactParams::PromptCacheOptions?
Options for prompt caching.
- #prompt_cache_retention ⇒ Symbol, ... deprecated Deprecated.
-
#service_tier ⇒ Symbol, ...
The service tier to use for this request.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see ResponseCompactParams for more details.
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, 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:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see OpenAI::Models::Responses::ResponseCompactParams for more details.
|
|
# File 'lib/openai/models/responses/response_compact_params.rb', line 83
|
Instance Attribute Details
#input ⇒ String, ...
Text, image, or file inputs to the model, used to generate a response
25 |
# File 'lib/openai/models/responses/response_compact_params.rb', line 25 optional :input, union: -> { OpenAI::Responses::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.
34 |
# File 'lib/openai/models/responses/response_compact_params.rb', line 34 optional :instructions, String, nil?: true |
#model ⇒ Symbol, ...
Model ID used to generate the response, like gpt-5 or o3. 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/responses/response_compact_params.rb', line 19 required :model, union: -> { OpenAI::Responses::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.
43 |
# File 'lib/openai/models/responses/response_compact_params.rb', line 43 optional :previous_response_id, String, nil?: true |
#prompt_cache_key ⇒ String?
A key to use when reading from or writing to the prompt cache.
49 |
# File 'lib/openai/models/responses/response_compact_params.rb', line 49 optional :prompt_cache_key, String, nil?: true |
#prompt_cache_options ⇒ OpenAI::Models::Responses::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, which is currently the only supported value. See the
prompt caching guide
for current details.
63 64 65 |
# File 'lib/openai/models/responses/response_compact_params.rb', line 63 optional :prompt_cache_options, -> { OpenAI::Responses::ResponseCompactParams::PromptCacheOptions }, nil?: true |
#prompt_cache_retention ⇒ Symbol, ...
How long to retain a prompt cache entry created by this request.
73 74 75 |
# File 'lib/openai/models/responses/response_compact_params.rb', line 73 optional :prompt_cache_retention, enum: -> { OpenAI::Responses::ResponseCompactParams::PromptCacheRetention }, nil?: true |
#service_tier ⇒ Symbol, ...
The service tier to use for this request.
81 |
# File 'lib/openai/models/responses/response_compact_params.rb', line 81 optional :service_tier, enum: -> { OpenAI::Responses::ResponseCompactParams::ServiceTier }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/responses/response_compact_params.rb', line 498
|
Instance Method Details
#to_hash ⇒ {
49 |
# File 'sig/openai/models/responses/response_compact_params.rbs', line 49
def to_hash: -> {
|