Class: OpenAI::Models::ResponseFormatJSONObject

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/response_format_json_object.rb

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, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

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

Constructor Details

#initialize(type: :json_object) ⇒ Object

JSON object response format. An older method of generating JSON responses. Using ‘json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.

Parameters:

  • type (Symbol, :json_object) (defaults to: :json_object)

    The type of response format being defined. Always ‘json_object`.



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

Instance Attribute Details

#typeSymbol, :json_object

The type of response format being defined. Always ‘json_object`.

Returns:

  • (Symbol, :json_object)


10
# File 'lib/openai/models/response_format_json_object.rb', line 10

required :type, const: :json_object