Class CreateEvalCompletionsRunDataSource.SamplingParams
-
- All Implemented Interfaces:
public final class CreateEvalCompletionsRunDataSource.SamplingParams
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
CreateEvalCompletionsRunDataSource.SamplingParams.Builder
A builder for SamplingParams.
public final class
CreateEvalCompletionsRunDataSource.SamplingParams.ResponseFormat
An object specifying the format that the model must output.
Setting to
{ "type": "json_schema", "json_schema": {...} }
enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }
enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schema
is preferred for models that support it.
-
Method Summary
Modifier and Type Method Description final Optional<Long>
maxCompletionTokens()
The maximum number of tokens in the generated output. final Optional<CreateEvalCompletionsRunDataSource.SamplingParams.ResponseFormat>
responseFormat()
An object specifying the format that the model must output. 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<List<ChatCompletionTool>>
tools()
A list of tools the model may call. 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<CreateEvalCompletionsRunDataSource.SamplingParams.ResponseFormat>
_responseFormat()
Returns the raw JSON value of responseFormat. final JsonField<Long>
_seed()
Returns the raw JSON value of seed. final JsonField<Double>
_temperature()
Returns the raw JSON value of temperature. final JsonField<List<ChatCompletionTool>>
_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 CreateEvalCompletionsRunDataSource.SamplingParams.Builder
toBuilder()
final CreateEvalCompletionsRunDataSource.SamplingParams
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static CreateEvalCompletionsRunDataSource.SamplingParams.Builder
builder()
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.
-
responseFormat
final Optional<CreateEvalCompletionsRunDataSource.SamplingParams.ResponseFormat> responseFormat()
An object specifying the format that the model must output.
Setting to
{ "type": "json_schema", "json_schema": {...} }
enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.Setting to
{ "type": "json_object" }
enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schema
is preferred for models that support it.
-
temperature
final Optional<Double> temperature()
A higher temperature increases randomness in the outputs.
-
tools
final Optional<List<ChatCompletionTool>> tools()
A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
-
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.
-
_responseFormat
final JsonField<CreateEvalCompletionsRunDataSource.SamplingParams.ResponseFormat> _responseFormat()
Returns the raw JSON value of responseFormat.
Unlike responseFormat, 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.
-
_tools
final JsonField<List<ChatCompletionTool>> _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 CreateEvalCompletionsRunDataSource.SamplingParams.Builder toBuilder()
-
validate
final CreateEvalCompletionsRunDataSource.SamplingParams validate()
-
builder
final static CreateEvalCompletionsRunDataSource.SamplingParams.Builder builder()
Returns a mutable builder for constructing an instance of SamplingParams.
-
-
-
-