Class: Anthropic::Models::Beta::BetaCodeExecutionTool20250825

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

Defined Under Namespace

Modules: AllowedCaller

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(allowed_callers: nil, cache_control: nil, defer_loading: nil, strict: nil, name: :code_execution, type: :code_execution_20250825) ⇒ BetaCodeExecutionTool20250825

Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaCodeExecutionTool20250825 for more details.

Parameters:

  • (defaults to: nil)
  • (defaults to: nil)

    Create a cache control breakpoint at this content block.

  • (defaults to: nil)

    If true, tool will not be included in initial system prompt. Only loaded when re

  • (defaults to: nil)

    When true, guarantees schema validation on tool names and inputs

  • (defaults to: :code_execution)

    Name of the tool.

  • (defaults to: :code_execution_20250825)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: :code_execution)
  • (defaults to: :code_execution_20250825)


# File 'lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb', line 45


Instance Attribute Details

#allowed_callers ⇒ Array<Symbol, Anthropic::Models::Beta::BetaCodeExecutionTool20250825::AllowedCaller>?

Parameters:

Returns:



23
24
# File 'lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb', line 23

optional :allowed_callers,
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaCodeExecutionTool20250825::AllowedCaller] }

#cache_control ⇒ Anthropic::Models::Beta::BetaCacheControlEphemeral?

Create a cache control breakpoint at this content block.

Parameters:

Returns:



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

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

#defer_loading ⇒ Boolean?

If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.

Parameters:

Returns:



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

optional :defer_loading, Anthropic::Internal::Type::Boolean

#name ⇒ Symbol, :code_execution

Name of the tool.

This is how the tool will be called by the model and in tool_use blocks.

Parameters:

Returns:



13
# File 'lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb', line 13

required :name, const: :code_execution

#strict ⇒ Boolean?

When true, guarantees schema validation on tool names and inputs

Parameters:

Returns:



43
# File 'lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb', line 43

optional :strict, Anthropic::Internal::Type::Boolean

#type ⇒ Symbol, :code_execution_20250825

Parameters:

Returns:



18
# File 'lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb', line 18

required :type, const: :code_execution_20250825

Instance Method Details

#to_hash ⇒ { name: :code_execution, type: :code_execution_20250825, allowed_callers: ::Array[Anthropic::Models::Beta::BetaCodeExecutionTool20250825::allowed_caller], cache_control: Anthropic::Beta::BetaCacheControlEphemeral?, defer_loading: bool, strict: bool }

Returns:



46
47
48
49
50
51
52
53
# File 'sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs', line 46

def to_hash: -> {
  name: :code_execution,
  type: :code_execution_20250825,
  allowed_callers: ::Array[Anthropic::Models::Beta::BetaCodeExecutionTool20250825::allowed_caller],
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
  defer_loading: bool,
  strict: bool
}