Class: OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams::Text

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/evals/run_create_response.rb,
sig/openai/models/evals/run_create_response.rbs

Overview

See Also:

  • OpenAI::Models::Evals::RunCreateResponse::DataSource::Responses::SamplingParams#text

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initializeObject



531
# File 'sig/openai/models/evals/run_create_response.rbs', line 531

def initialize: (

Instance Attribute Details

#format_OpenAI::Models::ResponseFormatText, ...

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. Using json_schema is preferred for models that support it.



753
754
755
756
757
# File 'lib/openai/models/evals/run_create_response.rb', line 753

optional :format_,
union: -> {
  OpenAI::Responses::ResponseFormatTextConfig
},
api_name: :format

Instance Method Details

#to_hash{

Returns:

  • ({)


535
# File 'sig/openai/models/evals/run_create_response.rbs', line 535

def to_hash: -> {