Class RunCancelResponse.DataSource.Responses.SamplingParams.Builder
-
- All Implemented Interfaces:
public final class RunCancelResponse.DataSource.Responses.SamplingParams.BuilderA builder for SamplingParams.
-
-
Method Summary
-
-
Method Detail
-
maxCompletionTokens
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder maxCompletionTokens(Long maxCompletionTokens)
The maximum number of tokens in the generated output.
-
maxCompletionTokens
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder maxCompletionTokens(JsonField<Long> maxCompletionTokens)
Sets Builder.maxCompletionTokens to an arbitrary JSON value.
You should usually call Builder.maxCompletionTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
reasoningEffort
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder reasoningEffort(ReasoningEffort reasoningEffort)
Constrains effort on reasoning for reasoning models. Currently supported values are
none,minimal,low,medium,high, andxhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1.All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone.The
gpt-5-promodel defaults to (and only supports)highreasoning effort.xhighis supported for all models aftergpt-5.1-codex-max.
-
reasoningEffort
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder reasoningEffort(Optional<ReasoningEffort> reasoningEffort)
Alias for calling Builder.reasoningEffort with
reasoningEffort.orElse(null).
-
reasoningEffort
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder reasoningEffort(JsonField<ReasoningEffort> reasoningEffort)
Sets Builder.reasoningEffort to an arbitrary JSON value.
You should usually call Builder.reasoningEffort with a well-typed ReasoningEffort value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
seed
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder seed(Long seed)
A seed value to initialize the randomness, during sampling.
-
seed
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder seed(JsonField<Long> seed)
Sets Builder.seed to an arbitrary JSON value.
You should usually call Builder.seed with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
temperature
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder temperature(Double temperature)
A higher temperature increases randomness in the outputs.
-
temperature
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder temperature(JsonField<Double> temperature)
Sets Builder.temperature to an arbitrary JSON value.
You should usually call Builder.temperature with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
text
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder text(RunCancelResponse.DataSource.Responses.SamplingParams.Text text)
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
-
text
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder text(JsonField<RunCancelResponse.DataSource.Responses.SamplingParams.Text> text)
Sets Builder.text to an arbitrary JSON value.
You should usually call Builder.text with a well-typed Text value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
tools
final RunCancelResponse.DataSource.Responses.SamplingParams.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 RunCancelResponse.DataSource.Responses.SamplingParams.Builder tools(JsonField<List<Tool>> tools)
Sets Builder.tools to an arbitrary JSON value.
You should usually call Builder.tools with a well-typed
List<Tool>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(Tool tool)
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(FunctionTool function)
Alias for calling addTool with
Tool.ofFunction(function).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(FileSearchTool fileSearch)
Alias for calling addTool with
Tool.ofFileSearch(fileSearch).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(ComputerTool computerUsePreview)
Alias for calling addTool with
Tool.ofComputerUsePreview(computerUsePreview).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(WebSearchTool webSearch)
Alias for calling addTool with
Tool.ofWebSearch(webSearch).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(Tool.Mcp mcp)
Alias for calling addTool with
Tool.ofMcp(mcp).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(Tool.CodeInterpreter codeInterpreter)
Alias for calling addTool with
Tool.ofCodeInterpreter(codeInterpreter).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(Tool.ImageGeneration imageGeneration)
Alias for calling addTool with
Tool.ofImageGeneration(imageGeneration).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(FunctionShellTool shell)
Alias for calling addTool with
Tool.ofShell(shell).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(CustomTool custom)
Alias for calling addTool with
Tool.ofCustom(custom).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(WebSearchPreviewTool webSearchPreview)
Alias for calling addTool with
Tool.ofWebSearchPreview(webSearchPreview).
-
addTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addTool(ApplyPatchTool applyPatch)
Alias for calling addTool with
Tool.ofApplyPatch(applyPatch).
-
addFileSearchTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addFileSearchTool(List<String> vectorStoreIds)
Alias for calling addTool with the following:
FileSearchTool.builder() .vectorStoreIds(vectorStoreIds) .build()
-
addMcpTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addMcpTool(String serverLabel)
Alias for calling addTool with the following:
Tool.Mcp.builder() .serverLabel(serverLabel) .build()
-
addCodeInterpreterTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addCodeInterpreterTool(Tool.CodeInterpreter.Container container)
Alias for calling addTool with the following:
Tool.CodeInterpreter.builder() .container(container) .build()
-
addCodeInterpreterTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addCodeInterpreterTool(String string)
Alias for calling addCodeInterpreterTool with
Tool.CodeInterpreter.Container.ofString(string).
-
addCodeInterpreterTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addCodeInterpreterTool(Tool.CodeInterpreter.Container.CodeInterpreterToolAuto codeInterpreterToolAuto)
Alias for calling addCodeInterpreterTool with
Tool.CodeInterpreter.Container.ofCodeInterpreterToolAuto(codeInterpreterToolAuto).
-
addToolLocalShell
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addToolLocalShell()
Alias for calling addTool with
Tool.ofLocalShell().
-
addCustomTool
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder addCustomTool(String name)
Alias for calling addTool with the following:
CustomTool.builder() .name(name) .build()
-
topP
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder topP(Double topP)
An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
-
topP
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder topP(JsonField<Double> topP)
Sets Builder.topP to an arbitrary JSON value.
You should usually call Builder.topP with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RunCancelResponse.DataSource.Responses.SamplingParams.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RunCancelResponse.DataSource.Responses.SamplingParams build()
Returns an immutable instance of SamplingParams.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-