Class RunCreateResponse.DataSource.Responses.SamplingParams.Builder
-
- All Implemented Interfaces:
public final class RunCreateResponse.DataSource.Responses.SamplingParams.BuilderA builder for SamplingParams.
-
-
Method Summary
-
-
Method Detail
-
maxCompletionTokens
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder maxCompletionTokens(Long maxCompletionTokens)
The maximum number of tokens in the generated output.
-
maxCompletionTokens
final RunCreateResponse.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 RunCreateResponse.DataSource.Responses.SamplingParams.Builder reasoningEffort(ReasoningEffort reasoningEffort)
Constrains effort on reasoning for reasoning models. Currently supported values are
minimal,low,medium, andhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
-
reasoningEffort
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder reasoningEffort(Optional<ReasoningEffort> reasoningEffort)
Alias for calling Builder.reasoningEffort with
reasoningEffort.orElse(null).
-
reasoningEffort
final RunCreateResponse.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 RunCreateResponse.DataSource.Responses.SamplingParams.Builder seed(Long seed)
A seed value to initialize the randomness, during sampling.
-
seed
final RunCreateResponse.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 RunCreateResponse.DataSource.Responses.SamplingParams.Builder temperature(Double temperature)
A higher temperature increases randomness in the outputs.
-
temperature
final RunCreateResponse.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 RunCreateResponse.DataSource.Responses.SamplingParams.Builder text(RunCreateResponse.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 RunCreateResponse.DataSource.Responses.SamplingParams.Builder text(JsonField<RunCreateResponse.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 RunCreateResponse.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 RunCreateResponse.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 RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(Tool tool)
-
addTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(FunctionTool function)
Alias for calling addTool with
Tool.ofFunction(function).
-
addTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(FileSearchTool fileSearch)
Alias for calling addTool with
Tool.ofFileSearch(fileSearch).
-
addTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(ComputerTool computerUsePreview)
Alias for calling addTool with
Tool.ofComputerUsePreview(computerUsePreview).
-
addTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(WebSearchTool webSearch)
Alias for calling addTool with
Tool.ofWebSearch(webSearch).
-
addTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(Tool.Mcp mcp)
Alias for calling addTool with
Tool.ofMcp(mcp).
-
addTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(Tool.CodeInterpreter codeInterpreter)
Alias for calling addTool with
Tool.ofCodeInterpreter(codeInterpreter).
-
addTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(Tool.ImageGeneration imageGeneration)
Alias for calling addTool with
Tool.ofImageGeneration(imageGeneration).
-
addTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(CustomTool custom)
Alias for calling addTool with
Tool.ofCustom(custom).
-
addTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addTool(WebSearchPreviewTool webSearchPreview)
Alias for calling addTool with
Tool.ofWebSearchPreview(webSearchPreview).
-
addFileSearchTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addFileSearchTool(List<String> vectorStoreIds)
Alias for calling addTool with the following:
FileSearchTool.builder() .vectorStoreIds(vectorStoreIds) .build()
-
addMcpTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addMcpTool(String serverLabel)
Alias for calling addTool with the following:
Tool.Mcp.builder() .serverLabel(serverLabel) .build()
-
addCodeInterpreterTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addCodeInterpreterTool(Tool.CodeInterpreter.Container container)
Alias for calling addTool with the following:
Tool.CodeInterpreter.builder() .container(container) .build()
-
addCodeInterpreterTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addCodeInterpreterTool(String string)
Alias for calling addCodeInterpreterTool with
Tool.CodeInterpreter.Container.ofString(string).
-
addCodeInterpreterTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addCodeInterpreterTool(Tool.CodeInterpreter.Container.CodeInterpreterToolAuto codeInterpreterToolAuto)
Alias for calling addCodeInterpreterTool with
Tool.CodeInterpreter.Container.ofCodeInterpreterToolAuto(codeInterpreterToolAuto).
-
addToolLocalShell
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addToolLocalShell()
Alias for calling addTool with
Tool.ofLocalShell().
-
addCustomTool
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder addCustomTool(String name)
Alias for calling addTool with the following:
CustomTool.builder() .name(name) .build()
-
topP
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder topP(Double topP)
An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
-
topP
final RunCreateResponse.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 RunCreateResponse.DataSource.Responses.SamplingParams.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final RunCreateResponse.DataSource.Responses.SamplingParams.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final RunCreateResponse.DataSource.Responses.SamplingParams build()
Returns an immutable instance of SamplingParams.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-