Class ResponseCreateParams.Builder
-
- All Implemented Interfaces:
public final class ResponseCreateParams.BuilderA builder for ResponseCreateParams.
-
-
Method Summary
Modifier and Type Method Description final ResponseCreateParams.Builderinput(ResponseCreateParams.Input input)Text, image, or file inputs to the model, used to generate a response. final ResponseCreateParams.Builderinput(JsonField<ResponseCreateParams.Input> input)Text, image, or file inputs to the model, used to generate a response. final ResponseCreateParams.Builderinput(String text)A text input to the model, equivalent to a text input with the userrole.final ResponseCreateParams.BuilderinputOfResponse(List<ResponseInputItem> response)A list of one or many input items to the model, containing different content types. final ResponseCreateParams.Buildermodel(ChatModel model)Model ID used to generate the response, like gpt-4ooro1.final ResponseCreateParams.Buildermodel(JsonField<ChatModel> model)Model ID used to generate the response, like gpt-4ooro1.final ResponseCreateParams.Buildermodel(String value)Model ID used to generate the response, like gpt-4ooro1.final ResponseCreateParams.Builderinclude(List<ResponseIncludable> include)Specify additional output data to include in the model response. final ResponseCreateParams.Builderinclude(Optional<List<ResponseIncludable>> include)Specify additional output data to include in the model response. final ResponseCreateParams.Builderinclude(JsonField<List<ResponseIncludable>> include)Specify additional output data to include in the model response. final ResponseCreateParams.BuilderaddInclude(ResponseIncludable include)Specify additional output data to include in the model response. final ResponseCreateParams.Builderinstructions(String instructions)Inserts a system (or developer) message as the first item in the model's context. final ResponseCreateParams.Builderinstructions(Optional<String> instructions)Inserts a system (or developer) message as the first item in the model's context. final ResponseCreateParams.Builderinstructions(JsonField<String> instructions)Inserts a system (or developer) message as the first item in the model's context. final ResponseCreateParams.BuildermaxOutputTokens(Long maxOutputTokens)An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. final ResponseCreateParams.BuildermaxOutputTokens(Long maxOutputTokens)An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. final ResponseCreateParams.BuildermaxOutputTokens(Optional<Long> maxOutputTokens)An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. final ResponseCreateParams.BuildermaxOutputTokens(JsonField<Long> maxOutputTokens)An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. final ResponseCreateParams.Buildermetadata(Metadata metadata)Set of 16 key-value pairs that can be attached to an object. final ResponseCreateParams.Buildermetadata(Optional<Metadata> metadata)Set of 16 key-value pairs that can be attached to an object. final ResponseCreateParams.Buildermetadata(JsonField<Metadata> metadata)Set of 16 key-value pairs that can be attached to an object. final ResponseCreateParams.BuilderparallelToolCalls(Boolean parallelToolCalls)Whether to allow the model to run tool calls in parallel. final ResponseCreateParams.BuilderparallelToolCalls(Boolean parallelToolCalls)Whether to allow the model to run tool calls in parallel. final ResponseCreateParams.BuilderparallelToolCalls(Optional<Boolean> parallelToolCalls)Whether to allow the model to run tool calls in parallel. final ResponseCreateParams.BuilderparallelToolCalls(JsonField<Boolean> parallelToolCalls)Whether to allow the model to run tool calls in parallel. final ResponseCreateParams.BuilderpreviousResponseId(String previousResponseId)The unique ID of the previous response to the model. final ResponseCreateParams.BuilderpreviousResponseId(Optional<String> previousResponseId)The unique ID of the previous response to the model. final ResponseCreateParams.BuilderpreviousResponseId(JsonField<String> previousResponseId)The unique ID of the previous response to the model. final ResponseCreateParams.Builderreasoning(Reasoning reasoning)o-series models onlyConfiguration options for reasoning models. final ResponseCreateParams.Builderreasoning(Optional<Reasoning> reasoning)o-series models onlyConfiguration options for reasoning models. final ResponseCreateParams.Builderreasoning(JsonField<Reasoning> reasoning)o-series models onlyConfiguration options for reasoning models. final ResponseCreateParams.Builderstore(Boolean store)Whether to store the generated model response for later retrieval via API. final ResponseCreateParams.Builderstore(Boolean store)Whether to store the generated model response for later retrieval via API. final ResponseCreateParams.Builderstore(Optional<Boolean> store)Whether to store the generated model response for later retrieval via API. final ResponseCreateParams.Builderstore(JsonField<Boolean> store)Whether to store the generated model response for later retrieval via API. final ResponseCreateParams.Buildertemperature(Double temperature)What sampling temperature to use, between 0 and 2. final ResponseCreateParams.Buildertemperature(Double temperature)What sampling temperature to use, between 0 and 2. final ResponseCreateParams.Buildertemperature(Optional<Double> temperature)What sampling temperature to use, between 0 and 2. final ResponseCreateParams.Buildertemperature(JsonField<Double> temperature)What sampling temperature to use, between 0 and 2. final ResponseCreateParams.Buildertext(ResponseTextConfig text)Configuration options for a text response from the model. final ResponseCreateParams.Buildertext(JsonField<ResponseTextConfig> text)Configuration options for a text response from the model. final ResponseCreateParams.BuildertoolChoice(ResponseCreateParams.ToolChoice toolChoice)How the model should select which tool (or tools) to use when generating a response. final ResponseCreateParams.BuildertoolChoice(JsonField<ResponseCreateParams.ToolChoice> toolChoice)How the model should select which tool (or tools) to use when generating a response. final ResponseCreateParams.BuildertoolChoice(ToolChoiceOptions options)Controls which (if any) tool is called by the model. final ResponseCreateParams.BuildertoolChoice(ToolChoiceTypes types)Indicates that the model should use a built-in tool to generate a response. final ResponseCreateParams.BuildertoolChoice(ToolChoiceFunction function)Use this option to force the model to call a specific function. final ResponseCreateParams.Buildertools(List<Tool> tools)An array of tools the model may call while generating a response. final ResponseCreateParams.Buildertools(JsonField<List<Tool>> tools)An array of tools the model may call while generating a response. final ResponseCreateParams.BuilderaddTool(Tool tool)An array of tools the model may call while generating a response. final ResponseCreateParams.BuilderaddTool(FileSearchTool fileSearch)A tool that searches for relevant content from uploaded files. final ResponseCreateParams.BuilderaddTool(FunctionTool function)Defines a function in your own code the model can choose to call. final ResponseCreateParams.BuilderaddTool(ComputerTool computerUsePreview)A tool that controls a virtual computer. final ResponseCreateParams.BuilderaddTool(WebSearchTool webSearch)This tool searches the web for relevant results to use in a response. final ResponseCreateParams.BuilderaddFileSearchTool(List<String> vectorStoreIds)A tool that searches for relevant content from uploaded files. final ResponseCreateParams.BuildertopP(Double topP)An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. final ResponseCreateParams.BuildertopP(Double topP)An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. final ResponseCreateParams.BuildertopP(Optional<Double> topP)An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. final ResponseCreateParams.BuildertopP(JsonField<Double> topP)An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. final ResponseCreateParams.Buildertruncation(ResponseCreateParams.Truncation truncation)The truncation strategy to use for the model response. final ResponseCreateParams.Buildertruncation(Optional<ResponseCreateParams.Truncation> truncation)The truncation strategy to use for the model response. final ResponseCreateParams.Buildertruncation(JsonField<ResponseCreateParams.Truncation> truncation)The truncation strategy to use for the model response. final ResponseCreateParams.Builderuser(String user)A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. final ResponseCreateParams.Builderuser(JsonField<String> user)A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. final ResponseCreateParams.BuilderadditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)final ResponseCreateParams.BuilderputAdditionalBodyProperty(String key, JsonValue value)final ResponseCreateParams.BuilderputAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)final ResponseCreateParams.BuilderremoveAdditionalBodyProperty(String key)final ResponseCreateParams.BuilderremoveAllAdditionalBodyProperties(Set<String> keys)final ResponseCreateParams.BuilderadditionalHeaders(Headers additionalHeaders)final ResponseCreateParams.BuilderadditionalHeaders(Map<String, Iterable<String>> additionalHeaders)final ResponseCreateParams.BuilderputAdditionalHeader(String name, String value)final ResponseCreateParams.BuilderputAdditionalHeaders(String name, Iterable<String> values)final ResponseCreateParams.BuilderputAllAdditionalHeaders(Headers additionalHeaders)final ResponseCreateParams.BuilderputAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)final ResponseCreateParams.BuilderreplaceAdditionalHeaders(String name, String value)final ResponseCreateParams.BuilderreplaceAdditionalHeaders(String name, Iterable<String> values)final ResponseCreateParams.BuilderreplaceAllAdditionalHeaders(Headers additionalHeaders)final ResponseCreateParams.BuilderreplaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)final ResponseCreateParams.BuilderremoveAdditionalHeaders(String name)final ResponseCreateParams.BuilderremoveAllAdditionalHeaders(Set<String> names)final ResponseCreateParams.BuilderadditionalQueryParams(QueryParams additionalQueryParams)final ResponseCreateParams.BuilderadditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)final ResponseCreateParams.BuilderputAdditionalQueryParam(String key, String value)final ResponseCreateParams.BuilderputAdditionalQueryParams(String key, Iterable<String> values)final ResponseCreateParams.BuilderputAllAdditionalQueryParams(QueryParams additionalQueryParams)final ResponseCreateParams.BuilderputAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)final ResponseCreateParams.BuilderreplaceAdditionalQueryParams(String key, String value)final ResponseCreateParams.BuilderreplaceAdditionalQueryParams(String key, Iterable<String> values)final ResponseCreateParams.BuilderreplaceAllAdditionalQueryParams(QueryParams additionalQueryParams)final ResponseCreateParams.BuilderreplaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)final ResponseCreateParams.BuilderremoveAdditionalQueryParams(String key)final ResponseCreateParams.BuilderremoveAllAdditionalQueryParams(Set<String> keys)final ResponseCreateParamsbuild()-
-
Method Detail
-
input
final ResponseCreateParams.Builder input(ResponseCreateParams.Input input)
Text, image, or file inputs to the model, used to generate a response.
Learn more:
-
input
final ResponseCreateParams.Builder input(JsonField<ResponseCreateParams.Input> input)
Text, image, or file inputs to the model, used to generate a response.
Learn more:
-
input
final ResponseCreateParams.Builder input(String text)
A text input to the model, equivalent to a text input with the
userrole.
-
inputOfResponse
final ResponseCreateParams.Builder inputOfResponse(List<ResponseInputItem> response)
A list of one or many input items to the model, containing different content types.
-
model
final ResponseCreateParams.Builder model(ChatModel model)
Model ID used to generate the response, like
gpt-4ooro1. 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 ResponseCreateParams.Builder model(JsonField<ChatModel> model)
Model ID used to generate the response, like
gpt-4ooro1. 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 ResponseCreateParams.Builder model(String value)
Model ID used to generate the response, like
gpt-4ooro1. 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.
-
include
final ResponseCreateParams.Builder include(List<ResponseIncludable> include)
Specify additional output data to include in the model response. Currently supported values are:
file_search_call.results: Include the search results of the file search tool call.message.input_image.image_url: Include image urls from the input message.computer_call_output.output.image_url: Include image urls from the computer call output.
-
include
final ResponseCreateParams.Builder include(Optional<List<ResponseIncludable>> include)
Specify additional output data to include in the model response. Currently supported values are:
file_search_call.results: Include the search results of the file search tool call.message.input_image.image_url: Include image urls from the input message.computer_call_output.output.image_url: Include image urls from the computer call output.
-
include
final ResponseCreateParams.Builder include(JsonField<List<ResponseIncludable>> include)
Specify additional output data to include in the model response. Currently supported values are:
file_search_call.results: Include the search results of the file search tool call.message.input_image.image_url: Include image urls from the input message.computer_call_output.output.image_url: Include image urls from the computer call output.
-
addInclude
final ResponseCreateParams.Builder addInclude(ResponseIncludable include)
Specify additional output data to include in the model response. Currently supported values are:
file_search_call.results: Include the search results of the file search tool call.message.input_image.image_url: Include image urls from the input message.computer_call_output.output.image_url: Include image urls from the computer call output.
-
instructions
final ResponseCreateParams.Builder instructions(String instructions)
Inserts a system (or developer) message as the first item in the model's context.
When using along with
previous_response_id, the instructions from a previous response will be not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.
-
instructions
final ResponseCreateParams.Builder instructions(Optional<String> instructions)
Inserts a system (or developer) message as the first item in the model's context.
When using along with
previous_response_id, the instructions from a previous response will be not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.
-
instructions
final ResponseCreateParams.Builder instructions(JsonField<String> instructions)
Inserts a system (or developer) message as the first item in the model's context.
When using along with
previous_response_id, the instructions from a previous response will be not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.
-
maxOutputTokens
final ResponseCreateParams.Builder maxOutputTokens(Long maxOutputTokens)
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
maxOutputTokens
final ResponseCreateParams.Builder maxOutputTokens(Long maxOutputTokens)
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
maxOutputTokens
final ResponseCreateParams.Builder maxOutputTokens(Optional<Long> maxOutputTokens)
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
maxOutputTokens
final ResponseCreateParams.Builder maxOutputTokens(JsonField<Long> maxOutputTokens)
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
metadata
final ResponseCreateParams.Builder metadata(Metadata metadata)
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
metadata
final ResponseCreateParams.Builder metadata(Optional<Metadata> metadata)
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
metadata
final ResponseCreateParams.Builder metadata(JsonField<Metadata> metadata)
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
parallelToolCalls
final ResponseCreateParams.Builder parallelToolCalls(Boolean parallelToolCalls)
Whether to allow the model to run tool calls in parallel.
-
parallelToolCalls
final ResponseCreateParams.Builder parallelToolCalls(Boolean parallelToolCalls)
Whether to allow the model to run tool calls in parallel.
-
parallelToolCalls
final ResponseCreateParams.Builder parallelToolCalls(Optional<Boolean> parallelToolCalls)
Whether to allow the model to run tool calls in parallel.
-
parallelToolCalls
final ResponseCreateParams.Builder parallelToolCalls(JsonField<Boolean> parallelToolCalls)
Whether to allow the model to run tool calls in parallel.
-
previousResponseId
final ResponseCreateParams.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.
-
previousResponseId
final ResponseCreateParams.Builder previousResponseId(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.
-
previousResponseId
final ResponseCreateParams.Builder previousResponseId(JsonField<String> previousResponseId)
The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.
-
reasoning
final ResponseCreateParams.Builder reasoning(Reasoning reasoning)
o-series models only
Configuration options for reasoning models.
-
reasoning
final ResponseCreateParams.Builder reasoning(Optional<Reasoning> reasoning)
o-series models only
Configuration options for reasoning models.
-
reasoning
final ResponseCreateParams.Builder reasoning(JsonField<Reasoning> reasoning)
o-series models only
Configuration options for reasoning models.
-
store
final ResponseCreateParams.Builder store(Boolean store)
Whether to store the generated model response for later retrieval via API.
-
store
final ResponseCreateParams.Builder store(Boolean store)
Whether to store the generated model response for later retrieval via API.
-
store
final ResponseCreateParams.Builder store(Optional<Boolean> store)
Whether to store the generated model response for later retrieval via API.
-
store
final ResponseCreateParams.Builder store(JsonField<Boolean> store)
Whether to store the generated model response for later retrieval via API.
-
temperature
final ResponseCreateParams.Builder temperature(Double temperature)
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or
top_pbut not both.
-
temperature
final ResponseCreateParams.Builder temperature(Double temperature)
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or
top_pbut not both.
-
temperature
final ResponseCreateParams.Builder temperature(Optional<Double> temperature)
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or
top_pbut not both.
-
temperature
final ResponseCreateParams.Builder temperature(JsonField<Double> temperature)
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or
top_pbut not both.
-
text
final ResponseCreateParams.Builder text(ResponseTextConfig text)
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
-
text
final ResponseCreateParams.Builder text(JsonField<ResponseTextConfig> text)
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
-
toolChoice
final ResponseCreateParams.Builder toolChoice(ResponseCreateParams.ToolChoice toolChoice)
How the model should select which tool (or tools) to use when generating a response. See the
toolsparameter to see how to specify which tools the model can call.
-
toolChoice
final ResponseCreateParams.Builder toolChoice(JsonField<ResponseCreateParams.ToolChoice> toolChoice)
How the model should select which tool (or tools) to use when generating a response. See the
toolsparameter to see how to specify which tools the model can call.
-
toolChoice
final ResponseCreateParams.Builder toolChoice(ToolChoiceOptions options)
Controls which (if any) tool is called by the model.
nonemeans the model will not call any tool and instead generates a message.automeans the model can pick between generating a message or calling one or more tools.requiredmeans the model must call one or more tools.
-
toolChoice
final ResponseCreateParams.Builder toolChoice(ToolChoiceTypes types)
Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
-
toolChoice
final ResponseCreateParams.Builder toolChoice(ToolChoiceFunction function)
Use this option to force the model to call a specific function.
-
tools
final ResponseCreateParams.Builder tools(List<Tool> tools)
An array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choiceparameter.The two categories of tools you can provide the model are:
Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
-
tools
final ResponseCreateParams.Builder tools(JsonField<List<Tool>> tools)
An array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choiceparameter.The two categories of tools you can provide the model are:
Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
-
addTool
final ResponseCreateParams.Builder addTool(Tool tool)
An array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choiceparameter.The two categories of tools you can provide the model are:
Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
-
addTool
final ResponseCreateParams.Builder addTool(FileSearchTool fileSearch)
A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
addTool
final ResponseCreateParams.Builder addTool(FunctionTool function)
Defines a function in your own code the model can choose to call. Learn more about function calling.
-
addTool
final ResponseCreateParams.Builder addTool(ComputerTool computerUsePreview)
A tool that controls a virtual computer. Learn more about the computer tool.
-
addTool
final ResponseCreateParams.Builder addTool(WebSearchTool webSearch)
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
-
addFileSearchTool
final ResponseCreateParams.Builder addFileSearchTool(List<String> vectorStoreIds)
A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
topP
final ResponseCreateParams.Builder topP(Double topP)
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperaturebut not both.
-
topP
final ResponseCreateParams.Builder topP(Double topP)
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperaturebut not both.
-
topP
final ResponseCreateParams.Builder topP(Optional<Double> topP)
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperaturebut not both.
-
topP
final ResponseCreateParams.Builder topP(JsonField<Double> topP)
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperaturebut not both.
-
truncation
final ResponseCreateParams.Builder truncation(ResponseCreateParams.Truncation truncation)
The truncation strategy to use for the model response.
auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled(default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
-
truncation
final ResponseCreateParams.Builder truncation(Optional<ResponseCreateParams.Truncation> truncation)
The truncation strategy to use for the model response.
auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled(default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
-
truncation
final ResponseCreateParams.Builder truncation(JsonField<ResponseCreateParams.Truncation> truncation)
The truncation strategy to use for the model response.
auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled(default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
-
user
final ResponseCreateParams.Builder user(String user)
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
user
final ResponseCreateParams.Builder user(JsonField<String> user)
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
additionalBodyProperties
final ResponseCreateParams.Builder additionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
putAdditionalBodyProperty
final ResponseCreateParams.Builder putAdditionalBodyProperty(String key, JsonValue value)
-
putAllAdditionalBodyProperties
final ResponseCreateParams.Builder putAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
removeAdditionalBodyProperty
final ResponseCreateParams.Builder removeAdditionalBodyProperty(String key)
-
removeAllAdditionalBodyProperties
final ResponseCreateParams.Builder removeAllAdditionalBodyProperties(Set<String> keys)
-
additionalHeaders
final ResponseCreateParams.Builder additionalHeaders(Headers additionalHeaders)
-
additionalHeaders
final ResponseCreateParams.Builder additionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
putAdditionalHeader
final ResponseCreateParams.Builder putAdditionalHeader(String name, String value)
-
putAdditionalHeaders
final ResponseCreateParams.Builder putAdditionalHeaders(String name, Iterable<String> values)
-
putAllAdditionalHeaders
final ResponseCreateParams.Builder putAllAdditionalHeaders(Headers additionalHeaders)
-
putAllAdditionalHeaders
final ResponseCreateParams.Builder putAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
replaceAdditionalHeaders
final ResponseCreateParams.Builder replaceAdditionalHeaders(String name, String value)
-
replaceAdditionalHeaders
final ResponseCreateParams.Builder replaceAdditionalHeaders(String name, Iterable<String> values)
-
replaceAllAdditionalHeaders
final ResponseCreateParams.Builder replaceAllAdditionalHeaders(Headers additionalHeaders)
-
replaceAllAdditionalHeaders
final ResponseCreateParams.Builder replaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
removeAdditionalHeaders
final ResponseCreateParams.Builder removeAdditionalHeaders(String name)
-
removeAllAdditionalHeaders
final ResponseCreateParams.Builder removeAllAdditionalHeaders(Set<String> names)
-
additionalQueryParams
final ResponseCreateParams.Builder additionalQueryParams(QueryParams additionalQueryParams)
-
additionalQueryParams
final ResponseCreateParams.Builder additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
putAdditionalQueryParam
final ResponseCreateParams.Builder putAdditionalQueryParam(String key, String value)
-
putAdditionalQueryParams
final ResponseCreateParams.Builder putAdditionalQueryParams(String key, Iterable<String> values)
-
putAllAdditionalQueryParams
final ResponseCreateParams.Builder putAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
putAllAdditionalQueryParams
final ResponseCreateParams.Builder putAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
replaceAdditionalQueryParams
final ResponseCreateParams.Builder replaceAdditionalQueryParams(String key, String value)
-
replaceAdditionalQueryParams
final ResponseCreateParams.Builder replaceAdditionalQueryParams(String key, Iterable<String> values)
-
replaceAllAdditionalQueryParams
final ResponseCreateParams.Builder replaceAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
replaceAllAdditionalQueryParams
final ResponseCreateParams.Builder replaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
removeAdditionalQueryParams
final ResponseCreateParams.Builder removeAdditionalQueryParams(String key)
-
removeAllAdditionalQueryParams
final ResponseCreateParams.Builder removeAllAdditionalQueryParams(Set<String> keys)
-
build
final ResponseCreateParams build()
-
-
-
-