Class: OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig

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

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



28
# File 'sig/openai/models/beta/beta_response_format_text_json_schema_config.rbs', line 28

def initialize: (

Instance Attribute Details

#descriptionString?

A description of what the response format is for, used by the model to determine how to respond in the format.

Parameters:

  • (String)

Returns:

  • (String, nil)


32
# File 'lib/openai/models/beta/beta_response_format_text_json_schema_config.rb', line 32

optional :description, String

#nameString

The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/openai/models/beta/beta_response_format_text_json_schema_config.rb', line 12

required :name, String

#schemaHash{Symbol=>Object}

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

Parameters:

  • value (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object})


19
# File 'lib/openai/models/beta/beta_response_format_text_json_schema_config.rb', line 19

required :schema, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]

#strictBoolean?

Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true. To learn more, read the Structured Outputs guide.

Parameters:

Returns:



42
# File 'lib/openai/models/beta/beta_response_format_text_json_schema_config.rb', line 42

optional :strict, OpenAI::Internal::Type::Boolean, nil?: true

#typeSymbol, :json_schema

The type of response format being defined. Always json_schema.

Parameters:

  • value (:json_schema)

Returns:

  • (Symbol, :json_schema)


25
# File 'lib/openai/models/beta/beta_response_format_text_json_schema_config.rb', line 25

required :type, const: :json_schema

Instance Method Details

#to_hash{

Returns:

  • ({)


36
# File 'sig/openai/models/beta/beta_response_format_text_json_schema_config.rbs', line 36

def to_hash: -> {