Class ResponseCompactParams.Body.Builder
-
- All Implemented Interfaces:
public final class ResponseCompactParams.Body.BuilderA builder for Body.
-
-
Method Summary
-
-
Method Detail
-
model
final ResponseCompactParams.Body.Builder model(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.
-
model
final ResponseCompactParams.Body.Builder model(Optional<ResponseCompactParams.Model> model)
Alias for calling Builder.model with
model.orElse(null).
-
model
final ResponseCompactParams.Body.Builder model(JsonField<ResponseCompactParams.Model> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed Model value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final ResponseCompactParams.Body.Builder model(String value)
Sets model to an arbitrary String.
You should usually call model with a well-typed Model constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
input
final ResponseCompactParams.Body.Builder input(ResponseCompactParams.Input input)
Text, image, or file inputs to the model, used to generate a response
-
input
final ResponseCompactParams.Body.Builder input(Optional<ResponseCompactParams.Input> input)
Alias for calling Builder.input with
input.orElse(null).
-
input
final ResponseCompactParams.Body.Builder input(JsonField<ResponseCompactParams.Input> input)
Sets Builder.input to an arbitrary JSON value.
You should usually call Builder.input with a well-typed Input value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
input
final ResponseCompactParams.Body.Builder input(String string)
Alias for calling input with
Input.ofString(string).
-
inputOfResponseInputItems
final ResponseCompactParams.Body.Builder inputOfResponseInputItems(List<ResponseInputItem> responseInputItems)
Alias for calling input with
Input.ofResponseInputItems(responseInputItems).
-
instructions
final ResponseCompactParams.Body.Builder instructions(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.
-
instructions
final ResponseCompactParams.Body.Builder instructions(Optional<String> instructions)
Alias for calling Builder.instructions with
instructions.orElse(null).
-
instructions
final ResponseCompactParams.Body.Builder instructions(JsonField<String> instructions)
Sets Builder.instructions to an arbitrary JSON value.
You should usually call Builder.instructions with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
previousResponseId
final ResponseCompactParams.Body.Builder previousResponseId(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.
-
previousResponseId
final ResponseCompactParams.Body.Builder previousResponseId(Optional<String> previousResponseId)
Alias for calling Builder.previousResponseId with
previousResponseId.orElse(null).
-
previousResponseId
final ResponseCompactParams.Body.Builder previousResponseId(JsonField<String> previousResponseId)
Sets Builder.previousResponseId to an arbitrary JSON value.
You should usually call Builder.previousResponseId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final ResponseCompactParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ResponseCompactParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ResponseCompactParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ResponseCompactParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ResponseCompactParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ResponseCompactParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.model()
-
-
-
-