Class RunCreateParams.DataSource.CreateEvalResponsesRunDataSource.SamplingParams.Text
-
- All Implemented Interfaces:
public final class RunCreateParams.DataSource.CreateEvalResponsesRunDataSource.SamplingParams.Text
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
RunCreateParams.DataSource.CreateEvalResponsesRunDataSource.SamplingParams.Text.Builder
A builder for Text.
-
Method Summary
Modifier and Type Method Description final Optional<ResponseFormatTextConfig>
format()
An object specifying the format that the model must output. final JsonField<ResponseFormatTextConfig>
_format()
Returns the raw JSON value of format. final Map<String, JsonValue>
_additionalProperties()
final RunCreateParams.DataSource.CreateEvalResponsesRunDataSource.SamplingParams.Text.Builder
toBuilder()
final RunCreateParams.DataSource.CreateEvalResponsesRunDataSource.SamplingParams.Text
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static RunCreateParams.DataSource.CreateEvalResponsesRunDataSource.SamplingParams.Text.Builder
builder()
Returns a mutable builder for constructing an instance of Text. -
-
Method Detail
-
format
final Optional<ResponseFormatTextConfig> format()
An object specifying the format that the model must output.
Configuring
{ "type": "json_schema" }
enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is
{ "type": "text" }
with no additional options.Not recommended for gpt-4o and newer models:
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.
-
_format
final JsonField<ResponseFormatTextConfig> _format()
Returns the raw JSON value of format.
Unlike format, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RunCreateParams.DataSource.CreateEvalResponsesRunDataSource.SamplingParams.Text.Builder toBuilder()
-
validate
final RunCreateParams.DataSource.CreateEvalResponsesRunDataSource.SamplingParams.Text validate()
-
builder
final static RunCreateParams.DataSource.CreateEvalResponsesRunDataSource.SamplingParams.Text.Builder builder()
Returns a mutable builder for constructing an instance of Text.
-
-
-
-