Class: Stagehand::Models::SessionExtractParams::Options
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Stagehand::Models::SessionExtractParams::Options
- Defined in:
- lib/stagehand/models/session_extract_params.rb
Defined Under Namespace
Modules: Model
Instance Attribute Summary collapse
-
#ignore_selectors ⇒ Array<String>?
Selectors for elements and subtrees that should be excluded from extraction.
-
#model ⇒ Stagehand::Models::ModelConfig, ...
Model configuration object or model name string (e.g., ‘openai/gpt-5-nano’).
-
#selector ⇒ String?
CSS selector to scope extraction to a specific element.
-
#timeout ⇒ Float?
Timeout in ms for the extraction.
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(ignore_selectors: nil, model: nil, selector: nil, timeout: nil) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/stagehand/models/session_extract_params.rb', line 62 class Options < Stagehand::Internal::Type::BaseModel # @!attribute ignore_selectors # Selectors for elements and subtrees that should be excluded from extraction # # @return [Array<String>, nil] optional :ignore_selectors, Stagehand::Internal::Type::ArrayOf[String], api_name: :ignoreSelectors # @!attribute model # Model configuration object or model name string (e.g., 'openai/gpt-5-nano') # # @return [Stagehand::Models::ModelConfig, String, nil] optional :model, union: -> { Stagehand::SessionExtractParams::Options::Model } # @!attribute selector # CSS selector to scope extraction to a specific element # # @return [String, nil] optional :selector, String # @!attribute timeout # Timeout in ms for the extraction # # @return [Float, nil] optional :timeout, Float # @!method initialize(ignore_selectors: nil, model: nil, selector: nil, timeout: nil) # @param ignore_selectors [Array<String>] Selectors for elements and subtrees that should be excluded from extraction # # @param model [Stagehand::Models::ModelConfig, String] Model configuration object or model name string (e.g., 'openai/gpt-5-nano') # # @param selector [String] CSS selector to scope extraction to a specific element # # @param timeout [Float] Timeout in ms for the extraction # Model configuration object or model name string (e.g., 'openai/gpt-5-nano') # # @see Stagehand::Models::SessionExtractParams::Options#model module Model extend Stagehand::Internal::Type::Union variant -> { Stagehand::ModelConfig } variant String # @!method self.variants # @return [Array(Stagehand::Models::ModelConfig, String)] end end |
Instance Attribute Details
#ignore_selectors ⇒ Array<String>?
Selectors for elements and subtrees that should be excluded from extraction
67 |
# File 'lib/stagehand/models/session_extract_params.rb', line 67 optional :ignore_selectors, Stagehand::Internal::Type::ArrayOf[String], api_name: :ignoreSelectors |
#model ⇒ Stagehand::Models::ModelConfig, ...
Model configuration object or model name string (e.g., ‘openai/gpt-5-nano’)
73 |
# File 'lib/stagehand/models/session_extract_params.rb', line 73 optional :model, union: -> { Stagehand::SessionExtractParams::Options::Model } |
#selector ⇒ String?
CSS selector to scope extraction to a specific element
79 |
# File 'lib/stagehand/models/session_extract_params.rb', line 79 optional :selector, String |
#timeout ⇒ Float?
Timeout in ms for the extraction
85 |
# File 'lib/stagehand/models/session_extract_params.rb', line 85 optional :timeout, Float |