Class: Anthropic::Models::Beta::BetaJSONOutputFormat

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_json_output_format.rb,
sig/anthropic/models/beta/beta_json_output_format.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



14
# File 'sig/anthropic/models/beta/beta_json_output_format.rbs', line 14

def initialize: (

Instance Attribute Details

#schemaHash{Symbol=>Object}

The JSON schema of the format

Parameters:

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

Returns:

  • (Hash{Symbol=>Object})


11
# File 'lib/anthropic/models/beta/beta_json_output_format.rb', line 11

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

#typeSymbol, :json_schema

Parameters:

  • value (:json_schema)

Returns:

  • (Symbol, :json_schema)


16
# File 'lib/anthropic/models/beta/beta_json_output_format.rb', line 16

required :type, const: :json_schema

Instance Method Details

#to_hash{ schema: ::Hash[Symbol, top], type: :json_schema }

Returns:

  • ({ schema: ::Hash[Symbol, top], type: :json_schema })


19
# File 'sig/anthropic/models/beta/beta_json_output_format.rbs', line 19

def to_hash: -> { schema: ::Hash[Symbol, top], type: :json_schema }