Class RunRetrieveResponse.DataSource.Responses.SamplingParams
-
- All Implemented Interfaces:
public final class RunRetrieveResponse.DataSource.Responses.SamplingParams
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRunRetrieveResponse.DataSource.Responses.SamplingParams.BuilderA builder for SamplingParams.
public final classRunRetrieveResponse.DataSource.Responses.SamplingParams.TextConfiguration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
-
Method Summary
Modifier and Type Method Description final Optional<Long>maxCompletionTokens()The maximum number of tokens in the generated output. final Optional<ReasoningEffort>reasoningEffort()Constrains effort on reasoning for reasoning models. final Optional<Long>seed()A seed value to initialize the randomness, during sampling. final Optional<Double>temperature()A higher temperature increases randomness in the outputs. final Optional<RunRetrieveResponse.DataSource.Responses.SamplingParams.Text>text()Configuration options for a text response from the model. final Optional<List<Tool>>tools()An array of tools the model may call while generating a response. final Optional<Double>topP()An alternative to temperature for nucleus sampling; 1.0 includes all tokens. final JsonField<Long>_maxCompletionTokens()Returns the raw JSON value of maxCompletionTokens. final JsonField<ReasoningEffort>_reasoningEffort()Returns the raw JSON value of reasoningEffort. final JsonField<Long>_seed()Returns the raw JSON value of seed. final JsonField<Double>_temperature()Returns the raw JSON value of temperature. final JsonField<RunRetrieveResponse.DataSource.Responses.SamplingParams.Text>_text()Returns the raw JSON value of text. final JsonField<List<Tool>>_tools()Returns the raw JSON value of tools. final JsonField<Double>_topP()Returns the raw JSON value of topP. final Map<String, JsonValue>_additionalProperties()final RunRetrieveResponse.DataSource.Responses.SamplingParams.BuildertoBuilder()final RunRetrieveResponse.DataSource.Responses.SamplingParamsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RunRetrieveResponse.DataSource.Responses.SamplingParams.Builderbuilder()Returns a mutable builder for constructing an instance of SamplingParams. -
-
Method Detail
-
maxCompletionTokens
final Optional<Long> maxCompletionTokens()
The maximum number of tokens in the generated output.
-
reasoningEffort
final Optional<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.
-
temperature
final Optional<Double> temperature()
A higher temperature increases randomness in the outputs.
-
text
final Optional<RunRetrieveResponse.DataSource.Responses.SamplingParams.Text> text()
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
-
tools
final Optional<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.
-
topP
final Optional<Double> topP()
An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
-
_maxCompletionTokens
final JsonField<Long> _maxCompletionTokens()
Returns the raw JSON value of maxCompletionTokens.
Unlike maxCompletionTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_reasoningEffort
final JsonField<ReasoningEffort> _reasoningEffort()
Returns the raw JSON value of reasoningEffort.
Unlike reasoningEffort, this method doesn't throw if the JSON field has an unexpected type.
-
_seed
final JsonField<Long> _seed()
Returns the raw JSON value of seed.
Unlike seed, this method doesn't throw if the JSON field has an unexpected type.
-
_temperature
final JsonField<Double> _temperature()
Returns the raw JSON value of temperature.
Unlike temperature, this method doesn't throw if the JSON field has an unexpected type.
-
_text
final JsonField<RunRetrieveResponse.DataSource.Responses.SamplingParams.Text> _text()
Returns the raw JSON value of text.
Unlike text, this method doesn't throw if the JSON field has an unexpected type.
-
_tools
final JsonField<List<Tool>> _tools()
Returns the raw JSON value of tools.
Unlike tools, this method doesn't throw if the JSON field has an unexpected type.
-
_topP
final JsonField<Double> _topP()
Returns the raw JSON value of topP.
Unlike topP, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RunRetrieveResponse.DataSource.Responses.SamplingParams.Builder toBuilder()
-
validate
final RunRetrieveResponse.DataSource.Responses.SamplingParams 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 RunRetrieveResponse.DataSource.Responses.SamplingParams.Builder builder()
Returns a mutable builder for constructing an instance of SamplingParams.
-
-
-
-