Class: Anthropic::Models::BrowserReadPageInput

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

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(depth: nil, filter: nil, ref: nil, tab_id: nil) ⇒ BrowserReadPageInput

Return a structured accessibility tree of the page (or the subtree rooted at ref), with element references like [ref_7] that can be used as targets on later actions. Output is capped at 50,000 characters — narrow with ref or a smaller depth when exceeded.

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

Parameters:

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

    Maximum tree depth. Default 15.

  • filter (Symbol, Anthropic::Models::BrowserReadPageFilter, nil) (defaults to: nil) —

    Which elements to include. Omitted: every visible element. "interactive": intera

  • ref (String, nil) (defaults to: nil) —

    Element reference to read a subtree from. Omit to read from the page root.

  • tab_id (String, nil) (defaults to: nil) —

    Tab to act on. Defaults to the active tab when omitted.

  • depth: (Integer, nil) (defaults to: nil)
  • filter: (Anthropic::Models::browser_read_page_filter, nil) (defaults to: nil)
  • ref: (String, nil) (defaults to: nil)
  • tab_id: (String, nil) (defaults to: nil)


# File 'lib/anthropic/models/browser_read_page_input.rb', line 31

Instance Attribute Details

#depth ⇒ Integer?

Maximum tree depth. Default 15.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


10
# File 'lib/anthropic/models/browser_read_page_input.rb', line 10

optional :depth, Integer, nil?: true

#filter ⇒ Symbol, ...

Which elements to include. Omitted: every visible element. "interactive": interactive elements only. "all": additionally includes off-viewport elements.

Parameters:

  • value (Anthropic::Models::browser_read_page_filter, nil)

Returns:



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

optional :filter, enum: -> { Anthropic::BrowserReadPageFilter }, nil?: true

#ref ⇒ String?

Element reference to read a subtree from. Omit to read from the page root.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


23
# File 'lib/anthropic/models/browser_read_page_input.rb', line 23

optional :ref, String, nil?: true

#tab_id ⇒ String?

Tab to act on. Defaults to the active tab when omitted.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


29
# File 'lib/anthropic/models/browser_read_page_input.rb', line 29

optional :tab_id, String, nil?: true

Instance Method Details

#to_hash ⇒ { depth: Integer?, filter: Anthropic::Models::browser_read_page_filter?, ref: String?, tab_id: String? }

Returns:

  • ({ depth: Integer?, filter: Anthropic::Models::browser_read_page_filter?, ref: String?, tab_id: String? })


27
28
29
30
31
32
# File 'sig/anthropic/models/browser_read_page_input.rbs', line 27

def to_hash: -> {
  depth: Integer?,
  filter: Anthropic::Models::browser_read_page_filter?,
  ref: String?,
  tab_id: String?
}