Module: Anthropic::Models::Beta::BetaComputerToolUseBlock

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/beta/beta_computer_tool_use_block.rb,
sig/anthropic/models/beta/beta_computer_tool_use_block.rbs

Defined Under Namespace

Modules: Name

Class Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Class Method Details

.new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerKeyToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerHoldKeyToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerTypeToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerCursorPositionToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerMouseMoveToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerLeftMouseDownToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerLeftMouseUpToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerLeftClickToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerLeftClickDragToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerRightClickToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerMiddleClickToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerDoubleClickToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerTripleClickToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerScrollToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerWaitToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerScreenshotToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerZoomToolUseBlock .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Models::Beta::beta_computer_tool_use_block

Creates a new instance of the variant class whose name matches the given value, passing the remaining arguments to its constructor.

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

Overloads:

  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerKeyToolUseBlock

    Parameters:

    • name: (:key, "key")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerKeyInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerKeyToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerHoldKeyToolUseBlock

    Parameters:

    • name: (:hold_key, "hold_key")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerHoldKeyInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerHoldKeyToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerTypeToolUseBlock

    Parameters:

    • name: (:type, "type")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerTypeInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerTypeToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerCursorPositionToolUseBlock

    Parameters:

    • name: (:cursor_position, "cursor_position")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerCursorPositionInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerCursorPositionToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerMouseMoveToolUseBlock

    Parameters:

    • name: (:mouse_move, "mouse_move")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerMouseMoveInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerMouseMoveToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerLeftMouseDownToolUseBlock

    Parameters:

    • name: (:left_mouse_down, "left_mouse_down")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerLeftMouseDownInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerLeftMouseDownToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerLeftMouseUpToolUseBlock

    Parameters:

    • name: (:left_mouse_up, "left_mouse_up")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerLeftMouseUpInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerLeftMouseUpToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerLeftClickToolUseBlock

    Parameters:

    • name: (:left_click, "left_click")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerLeftClickInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerLeftClickToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerLeftClickDragToolUseBlock

    Parameters:

    • name: (:left_click_drag, "left_click_drag")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerLeftClickDragInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerLeftClickDragToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerRightClickToolUseBlock

    Parameters:

    • name: (:right_click, "right_click")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerRightClickInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerRightClickToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerMiddleClickToolUseBlock

    Parameters:

    • name: (:middle_click, "middle_click")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerMiddleClickInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerMiddleClickToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerDoubleClickToolUseBlock

    Parameters:

    • name: (:double_click, "double_click")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerDoubleClickInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerDoubleClickToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerTripleClickToolUseBlock

    Parameters:

    • name: (:triple_click, "triple_click")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerTripleClickInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerTripleClickToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerScrollToolUseBlock

    Parameters:

    • name: (:scroll, "scroll")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerScrollInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerScrollToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerWaitToolUseBlock

    Parameters:

    • name: (:wait, "wait")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerWaitInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerWaitToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerScreenshotToolUseBlock

    Parameters:

    • name: (:screenshot, "screenshot")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerScreenshotInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerScreenshotToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Beta::BetaComputerZoomToolUseBlock

    Parameters:

    • name: (:zoom, "zoom")
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerZoomInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Beta::BetaComputerZoomToolUseBlock)
  • .new(name:, id:, input:, caller_:, toolset_name:, type:) ⇒ Anthropic::Models::Beta::beta_computer_tool_use_block

    Parameters:

    • name: (Anthropic::Models::Beta::BetaComputerToolUseBlock::name_, String)
    • id: (String)
    • input: (Anthropic::Beta::BetaComputerKeyInput, Anthropic::Beta::BetaComputerHoldKeyInput, Anthropic::Beta::BetaComputerTypeInput, Anthropic::Beta::BetaComputerCursorPositionInput, Anthropic::Beta::BetaComputerMouseMoveInput, Anthropic::Beta::BetaComputerLeftMouseDownInput, Anthropic::Beta::BetaComputerLeftMouseUpInput, Anthropic::Beta::BetaComputerLeftClickInput, Anthropic::Beta::BetaComputerLeftClickDragInput, Anthropic::Beta::BetaComputerRightClickInput, Anthropic::Beta::BetaComputerMiddleClickInput, Anthropic::Beta::BetaComputerDoubleClickInput, Anthropic::Beta::BetaComputerTripleClickInput, Anthropic::Beta::BetaComputerScrollInput, Anthropic::Beta::BetaComputerWaitInput, Anthropic::Beta::BetaComputerScreenshotInput, Anthropic::Beta::BetaComputerZoomInput)
    • caller_: (Anthropic::Models::Beta::beta_tool_use_caller)
    • toolset_name: (:computer)
    • type: (:tool_use)

    Returns:

    • (Anthropic::Models::Beta::beta_computer_tool_use_block)

Parameters:

  • name (Symbol, Anthropic::Models::Beta::BetaComputerToolUseBlock::Name, String)
  • args (Hash{Symbol=>Object}) —

    Attributes for the chosen variant.

    @option args [String] :id

    @option args [Anthropic::Models::Beta::BetaComputerKeyInput, Anthropic::Models::Beta::BetaComputerHoldKeyInput, Anthropic::Models::Beta::BetaComputerTypeInput, Anthropic::Models::Beta::BetaComputerCursorPositionInput, Anthropic::Models::Beta::BetaComputerMouseMoveInput, Anthropic::Models::Beta::BetaComputerLeftMouseDownInput, Anthropic::Models::Beta::BetaComputerLeftMouseUpInput, Anthropic::Models::Beta::BetaComputerLeftClickInput, Anthropic::Models::Beta::BetaComputerLeftClickDragInput, Anthropic::Models::Beta::BetaComputerRightClickInput, Anthropic::Models::Beta::BetaComputerMiddleClickInput, Anthropic::Models::Beta::BetaComputerDoubleClickInput, Anthropic::Models::Beta::BetaComputerTripleClickInput, Anthropic::Models::Beta::BetaComputerScrollInput, Anthropic::Models::Beta::BetaComputerWaitInput, Anthropic::Models::Beta::BetaComputerScreenshotInput, Anthropic::Models::Beta::BetaComputerZoomInput] :input Press a key or key-combination on the keyboard. Use "+" to combine modifiers wit

    @option args [Anthropic::Models::Beta::BetaDirectCaller, Anthropic::Models::Beta::BetaServerToolCaller, Anthropic::Models::Beta::BetaServerToolCaller20260120] :caller_ Which party invoked the tool call: the model directly, or a server tool on its b

    @option args [Symbol, :computer] :toolset_name

    @option args [Symbol, :tool_use] :type

Returns:

Raises:

  • (ArgumentError)


95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/anthropic/models/beta/beta_computer_tool_use_block.rb', line 95

def self.new(name:, **args)
  case name.to_sym
  when :key
    Anthropic::Beta::BetaComputerKeyToolUseBlock.new(**args)
  when :hold_key
    Anthropic::Beta::BetaComputerHoldKeyToolUseBlock.new(**args)
  when :type
    Anthropic::Beta::BetaComputerTypeToolUseBlock.new(**args)
  when :cursor_position
    Anthropic::Beta::BetaComputerCursorPositionToolUseBlock.new(**args)
  when :mouse_move
    Anthropic::Beta::BetaComputerMouseMoveToolUseBlock.new(**args)
  when :left_mouse_down
    Anthropic::Beta::BetaComputerLeftMouseDownToolUseBlock.new(**args)
  when :left_mouse_up
    Anthropic::Beta::BetaComputerLeftMouseUpToolUseBlock.new(**args)
  when :left_click
    Anthropic::Beta::BetaComputerLeftClickToolUseBlock.new(**args)
  when :left_click_drag
    Anthropic::Beta::BetaComputerLeftClickDragToolUseBlock.new(**args)
  when :right_click
    Anthropic::Beta::BetaComputerRightClickToolUseBlock.new(**args)
  when :middle_click
    Anthropic::Beta::BetaComputerMiddleClickToolUseBlock.new(**args)
  when :double_click
    Anthropic::Beta::BetaComputerDoubleClickToolUseBlock.new(**args)
  when :triple_click
    Anthropic::Beta::BetaComputerTripleClickToolUseBlock.new(**args)
  when :scroll
    Anthropic::Beta::BetaComputerScrollToolUseBlock.new(**args)
  when :wait
    Anthropic::Beta::BetaComputerWaitToolUseBlock.new(**args)
  when :screenshot
    Anthropic::Beta::BetaComputerScreenshotToolUseBlock.new(**args)
  when :zoom
    Anthropic::Beta::BetaComputerZoomToolUseBlock.new(**args)
  else
    raise ArgumentError, "unknown name: #{name}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_computer_tool_use_block.rb', line 66

.variants ⇒ Array(Anthropic::Models::Beta::BetaComputerKeyToolUseBlock, Anthropic::Models::Beta::BetaComputerHoldKeyToolUseBlock, Anthropic::Models::Beta::BetaComputerTypeToolUseBlock, Anthropic::Models::Beta::BetaComputerCursorPositionToolUseBlock, Anthropic::Models::Beta::BetaComputerMouseMoveToolUseBlock, Anthropic::Models::Beta::BetaComputerLeftMouseDownToolUseBlock, Anthropic::Models::Beta::BetaComputerLeftMouseUpToolUseBlock, Anthropic::Models::Beta::BetaComputerLeftClickToolUseBlock, Anthropic::Models::Beta::BetaComputerLeftClickDragToolUseBlock, Anthropic::Models::Beta::BetaComputerRightClickToolUseBlock, Anthropic::Models::Beta::BetaComputerMiddleClickToolUseBlock, Anthropic::Models::Beta::BetaComputerDoubleClickToolUseBlock, Anthropic::Models::Beta::BetaComputerTripleClickToolUseBlock, Anthropic::Models::Beta::BetaComputerScrollToolUseBlock, Anthropic::Models::Beta::BetaComputerWaitToolUseBlock, Anthropic::Models::Beta::BetaComputerScreenshotToolUseBlock, Anthropic::Models::Beta::BetaComputerZoomToolUseBlock)



# File 'lib/anthropic/models/beta/beta_computer_tool_use_block.rb', line 70