Class ResponseCompactParams.Body
-
- All Implemented Interfaces:
public final class ResponseCompactParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classResponseCompactParams.Body.BuilderA builder for Body.
-
Method Summary
Modifier and Type Method Description final Optional<ResponseCompactParams.Model>model()Model ID used to generate the response, like gpt-5oro3.final Optional<ResponseCompactParams.Input>input()Text, image, or file inputs to the model, used to generate a response final Optional<String>instructions()A system (or developer) message inserted into the model's context. final Optional<String>previousResponseId()The unique ID of the previous response to the model. final Optional<String>promptCacheKey()A key to use when reading from or writing to the prompt cache. final Optional<ResponseCompactParams.PromptCacheRetention>promptCacheRetention()How long to retain a prompt cache entry created by this request. final Optional<ResponseCompactParams.ServiceTier>serviceTier()The service tier to use for this request. final JsonField<ResponseCompactParams.Model>_model()Returns the raw JSON value of model. final JsonField<ResponseCompactParams.Input>_input()Returns the raw JSON value of input. final JsonField<String>_instructions()Returns the raw JSON value of instructions. final JsonField<String>_previousResponseId()Returns the raw JSON value of previousResponseId. final JsonField<String>_promptCacheKey()Returns the raw JSON value of promptCacheKey. final JsonField<ResponseCompactParams.PromptCacheRetention>_promptCacheRetention()Returns the raw JSON value of promptCacheRetention. final JsonField<ResponseCompactParams.ServiceTier>_serviceTier()Returns the raw JSON value of serviceTier. final Map<String, JsonValue>_additionalProperties()final ResponseCompactParams.Body.BuildertoBuilder()final ResponseCompactParams.Bodyvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponseCompactParams.Body.Builderbuilder()Returns a mutable builder for constructing an instance of Body. -
-
Method Detail
-
model
final Optional<ResponseCompactParams.Model> model()
Model ID used to generate the response, like
gpt-5oro3. 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.
-
input
final Optional<ResponseCompactParams.Input> input()
Text, image, or file inputs to the model, used to generate a response
-
instructions
final Optional<String> instructions()
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.
-
previousResponseId
final Optional<String> previousResponseId()
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.
-
promptCacheKey
final Optional<String> promptCacheKey()
A key to use when reading from or writing to the prompt cache.
-
promptCacheRetention
final Optional<ResponseCompactParams.PromptCacheRetention> promptCacheRetention()
How long to retain a prompt cache entry created by this request.
-
serviceTier
final Optional<ResponseCompactParams.ServiceTier> serviceTier()
The service tier to use for this request.
-
_model
final JsonField<ResponseCompactParams.Model> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_input
final JsonField<ResponseCompactParams.Input> _input()
Returns the raw JSON value of input.
Unlike input, this method doesn't throw if the JSON field has an unexpected type.
-
_instructions
final JsonField<String> _instructions()
Returns the raw JSON value of instructions.
Unlike instructions, this method doesn't throw if the JSON field has an unexpected type.
-
_previousResponseId
final JsonField<String> _previousResponseId()
Returns the raw JSON value of previousResponseId.
Unlike previousResponseId, this method doesn't throw if the JSON field has an unexpected type.
-
_promptCacheKey
final JsonField<String> _promptCacheKey()
Returns the raw JSON value of promptCacheKey.
Unlike promptCacheKey, this method doesn't throw if the JSON field has an unexpected type.
-
_promptCacheRetention
final JsonField<ResponseCompactParams.PromptCacheRetention> _promptCacheRetention()
Returns the raw JSON value of promptCacheRetention.
Unlike promptCacheRetention, this method doesn't throw if the JSON field has an unexpected type.
-
_serviceTier
final JsonField<ResponseCompactParams.ServiceTier> _serviceTier()
Returns the raw JSON value of serviceTier.
Unlike serviceTier, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseCompactParams.Body.Builder toBuilder()
-
validate
final ResponseCompactParams.Body validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static ResponseCompactParams.Body.Builder builder()
Returns a mutable builder for constructing an instance of Body.
The following fields are required:
.model()
-
-
-
-