Class: Anthropic::Models::ServerToolUseBlockParam

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

Defined Under Namespace

Modules: Caller, Name

Constant Summary collapse

Anthropic =

Returns:

  • (:DirectCaller)

Instance Attribute Summary collapse

Class Method 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(id:, input:, name:, cache_control: nil, caller_: nil, type: :server_tool_use) ⇒ Object

Parameters:



# File 'lib/anthropic/models/server_tool_use_block_param.rb', line 37

Instance Attribute Details

#cache_control ⇒ Anthropic::Models::CacheControlEphemeral?

Create a cache control breakpoint at this content block.



30
# File 'lib/anthropic/models/server_tool_use_block_param.rb', line 30

optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true

#caller_ ⇒ Anthropic::Models::DirectCaller, ...



35
# File 'lib/anthropic/models/server_tool_use_block_param.rb', line 35

optional :caller_, union: -> { Anthropic::ServerToolUseBlockParam::Caller }, api_name: :caller

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


9
# File 'lib/anthropic/models/server_tool_use_block_param.rb', line 9

required :id, String

#input ⇒ Hash{Symbol=>Object}

Parameters:

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

Returns:

  • (Hash{Symbol=>Object})


14
# File 'lib/anthropic/models/server_tool_use_block_param.rb', line 14

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

#name ⇒ Symbol, Anthropic::Models::ServerToolUseBlockParam::Name

Parameters:

  • value (Anthropic::Models::ServerToolUseBlockParam::name_)

Returns:



19
# File 'lib/anthropic/models/server_tool_use_block_param.rb', line 19

required :name, enum: -> { Anthropic::ServerToolUseBlockParam::Name }

#type ⇒ Symbol, :server_tool_use

Parameters:

  • value (:server_tool_use)

Returns:

  • (Symbol, :server_tool_use)


24
# File 'lib/anthropic/models/server_tool_use_block_param.rb', line 24

required :type, const: :server_tool_use

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/server_tool_use_block_param.rb', line 62

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


39
# File 'sig/anthropic/models/server_tool_use_block_param.rbs', line 39

def to_hash: -> {