Class: Anthropic::Models::Beta::BetaToolComputerUse20241022

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb,
sig/anthropic/models/beta/beta_tool_computer_use_20241022.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(display_height_px:, display_width_px:, allowed_callers: nil, cache_control: nil, defer_loading: nil, display_number: nil, input_examples: nil, strict: nil, name: :computer, type: :computer_20241022) ⇒ BetaToolComputerUse20241022

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

Parameters:

  • display_height_px (Integer) —

    The height of the display in pixels.

  • display_width_px (Integer) —

    The width of the display in pixels.

  • allowed_callers (Array<Symbol, Anthropic::Models::Beta::BetaToolComputerUse20241022::AllowedCaller>) (defaults to: nil)
  • cache_control (Anthropic::Models::Beta::BetaCacheControlEphemeral, nil) (defaults to: nil) —

    Create a cache control breakpoint at this content block.

  • defer_loading (Boolean) (defaults to: nil) —

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

  • display_number (Integer, nil) (defaults to: nil) —

    The X11 display number (e.g. 0, 1) for the display.

  • input_examples (Array<Hash{Symbol=>Object}>) (defaults to: nil)
  • strict (Boolean) (defaults to: nil) —

    When true, guarantees schema validation on tool names and inputs

  • name (Symbol, :computer) (defaults to: :computer) —

    Name of the tool.

  • type (Symbol, :computer_20241022) (defaults to: :computer_20241022)
  • display_height_px: (Integer)
  • display_width_px: (Integer)
  • allowed_callers: (::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller]) (defaults to: nil)
  • cache_control: (Anthropic::Beta::BetaCacheControlEphemeral, nil) (defaults to: nil)
  • defer_loading: (Boolean) (defaults to: nil)
  • display_number: (Integer, nil) (defaults to: nil)
  • input_examples: (::Array[::Hash[Symbol, top]]) (defaults to: nil)
  • strict: (Boolean) (defaults to: nil)
  • name: (:computer) (defaults to: :computer)
  • type: (:computer_20241022) (defaults to: :computer_20241022)


# File 'lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb', line 69

Instance Attribute Details

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

Parameters:

  • (::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller])

Returns:



35
36
# File 'lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb', line 35

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

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

Create a cache control breakpoint at this content block.

Parameters:

  • value (Anthropic::Beta::BetaCacheControlEphemeral, nil)

Returns:



42
# File 'lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb', line 42

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:



49
# File 'lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb', line 49

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

#display_height_px ⇒ Integer

The height of the display in pixels.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


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

required :display_height_px, Integer

#display_number ⇒ Integer?

The X11 display number (e.g. 0, 1) for the display.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


55
# File 'lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb', line 55

optional :display_number, Integer, nil?: true

#display_width_px ⇒ Integer

The width of the display in pixels.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


17
# File 'lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb', line 17

required :display_width_px, Integer

#input_examples ⇒ Array<Hash{Symbol=>Object}>?

Parameters:

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

Returns:

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


60
61
# File 'lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb', line 60

optional :input_examples,
Anthropic::Internal::Type::ArrayOf[Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]]

#name ⇒ Symbol, :computer

Name of the tool.

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

Parameters:

  • value (:computer)

Returns:

  • (Symbol, :computer)


25
# File 'lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb', line 25

required :name, const: :computer

#strict ⇒ Boolean?

When true, guarantees schema validation on tool names and inputs

Parameters:

Returns:



67
# File 'lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb', line 67

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

#type ⇒ Symbol, :computer_20241022

Parameters:

  • value (:computer_20241022)

Returns:

  • (Symbol, :computer_20241022)


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

required :type, const: :computer_20241022

Instance Method Details

#to_hash ⇒ { display_height_px: Integer, display_width_px: Integer, name: :computer, type: :computer_20241022, allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller], cache_control: Anthropic::Beta::BetaCacheControlEphemeral?, defer_loading: bool, display_number: Integer?, input_examples: ::Array[::Hash[Symbol, top]], strict: bool }

Returns:

  • ({ display_height_px: Integer, display_width_px: Integer, name: :computer, type: :computer_20241022, allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller], cache_control: Anthropic::Beta::BetaCacheControlEphemeral?, defer_loading: bool, display_number: Integer?, input_examples: ::Array[::Hash[Symbol, top]], strict: bool })


66
67
68
69
70
71
72
73
74
75
76
77
# File 'sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs', line 66

def to_hash: -> {
  display_height_px: Integer,
  display_width_px: Integer,
  name: :computer,
  type: :computer_20241022,
  allowed_callers: ::Array[Anthropic::Models::Beta::BetaToolComputerUse20241022::allowed_caller],
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
  defer_loading: bool,
  display_number: Integer?,
  input_examples: ::Array[::Hash[Symbol, top]],
  strict: bool
}