Class: Anthropic::Models::Beta::BetaTool::InputSchema

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

Overview

See Also:

  • Anthropic::Models::Beta::BetaTool#input_schema

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

#initialize ⇒ InputSchema

Returns a new instance of InputSchema.

Parameters:

  • properties: (::Hash[Symbol, top], nil)
  • required: (::Array[String], nil)
  • type: (:object)


95
96
97
98
99
# File 'sig/anthropic/models/beta/beta_tool.rbs', line 95

def initialize: (
  ?properties: ::Hash[Symbol, top]?,
  ?required: ::Array[String]?,
  ?type: :object
) -> void

Instance Attribute Details

#properties ⇒ Hash{Symbol=>Object}?

Parameters:

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

Returns:

  • (Hash{Symbol=>Object}, nil)


115
116
117
# File 'lib/anthropic/models/beta/beta_tool.rb', line 115

optional :properties,
Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown],
nil?: true

#required ⇒ Array<String>?

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


122
# File 'lib/anthropic/models/beta/beta_tool.rb', line 122

optional :required, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#type ⇒ Symbol, :object

Parameters:

  • value (:object)

Returns:

  • (Symbol, :object)


110
# File 'lib/anthropic/models/beta/beta_tool.rb', line 110

required :type, const: :object

Instance Method Details

#to_hash ⇒ { type: :object, properties: ::Hash[Symbol, top]?, required: ::Array[String]? }

Returns:

  • ({ type: :object, properties: ::Hash[Symbol, top]?, required: ::Array[String]? })


101
102
103
104
105
# File 'sig/anthropic/models/beta/beta_tool.rbs', line 101

def to_hash: -> {
  type: :object,
  properties: ::Hash[Symbol, top]?,
  required: ::Array[String]?
}