Class: Stagehand::Models::SessionObserveParams::Options
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Stagehand::Models::SessionObserveParams::Options
- Defined in:
- lib/stagehand/models/session_observe_params.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#model ⇒ Stagehand::Models::ModelConfig, ...
Model configuration object or model name string (e.g., ‘openai/gpt-5-nano’).
-
#selector ⇒ String?
CSS selector to scope observation to a specific element.
-
#timeout ⇒ Float?
Timeout in ms for the observation.
-
#variables ⇒ Hash{Symbol=>String, Float, Boolean, Stagehand::Models::SessionObserveParams::Options::Variable::UnionMember3}?
Variables whose names are exposed to the model so observe() returns %variableName% placeholders in suggested action arguments instead of literal values.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(model: nil, selector: nil, timeout: nil, variables: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Options for more details.
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(model: nil, selector: nil, timeout: nil, variables: nil) ⇒ Object
Some parameter documentations has been truncated, see Stagehand::Models::SessionObserveParams::Options for more details.
54 55 56 57 58 59 60 61 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 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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/stagehand/models/session_observe_params.rb', line 54 class Options < Stagehand::Internal::Type::BaseModel # @!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::SessionObserveParams::Options::Model } # @!attribute selector # CSS selector to scope observation to a specific element # # @return [String, nil] optional :selector, String # @!attribute timeout # Timeout in ms for the observation # # @return [Float, nil] optional :timeout, Float # @!attribute variables # Variables whose names are exposed to the model so observe() returns # %variableName% placeholders in suggested action arguments instead of literal # values. Accepts flat primitives or { value, description? } objects. # # @return [Hash{Symbol=>String, Float, Boolean, Stagehand::Models::SessionObserveParams::Options::Variable::UnionMember3}, nil] optional :variables, -> { Stagehand::Internal::Type::HashOf[union: Stagehand::SessionObserveParams::Options::Variable] } # @!method initialize(model: nil, selector: nil, timeout: nil, variables: nil) # Some parameter documentations has been truncated, see # {Stagehand::Models::SessionObserveParams::Options} for more details. # # @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 observation to a specific element # # @param timeout [Float] Timeout in ms for the observation # # @param variables [Hash{Symbol=>String, Float, Boolean, Stagehand::Models::SessionObserveParams::Options::Variable::UnionMember3}] Variables whose names are exposed to the model so observe() returns %variableNam # Model configuration object or model name string (e.g., 'openai/gpt-5-nano') # # @see Stagehand::Models::SessionObserveParams::Options#model module Model extend Stagehand::Internal::Type::Union variant -> { Stagehand::ModelConfig } variant String # @!method self.variants # @return [Array(Stagehand::Models::ModelConfig, String)] end module Variable extend Stagehand::Internal::Type::Union variant String variant Float variant Stagehand::Internal::Type::Boolean variant -> { Stagehand::SessionObserveParams::Options::Variable::UnionMember3 } class UnionMember3 < Stagehand::Internal::Type::BaseModel # @!attribute value # # @return [String, Float, Boolean] required :value, union: -> { Stagehand::SessionObserveParams::Options::Variable::UnionMember3::Value } # @!attribute description # # @return [String, nil] optional :description, String # @!method initialize(value:, description: nil) # @param value [String, Float, Boolean] # @param description [String] # @see Stagehand::Models::SessionObserveParams::Options::Variable::UnionMember3#value module Value extend Stagehand::Internal::Type::Union variant String variant Float variant Stagehand::Internal::Type::Boolean # @!method self.variants # @return [Array(String, Float, Boolean)] end end # @!method self.variants # @return [Array(String, Float, Boolean, Stagehand::Models::SessionObserveParams::Options::Variable::UnionMember3)] end end |
Instance Attribute Details
#model ⇒ Stagehand::Models::ModelConfig, ...
Model configuration object or model name string (e.g., ‘openai/gpt-5-nano’)
59 |
# File 'lib/stagehand/models/session_observe_params.rb', line 59 optional :model, union: -> { Stagehand::SessionObserveParams::Options::Model } |
#selector ⇒ String?
CSS selector to scope observation to a specific element
65 |
# File 'lib/stagehand/models/session_observe_params.rb', line 65 optional :selector, String |
#timeout ⇒ Float?
Timeout in ms for the observation
71 |
# File 'lib/stagehand/models/session_observe_params.rb', line 71 optional :timeout, Float |
#variables ⇒ Hash{Symbol=>String, Float, Boolean, Stagehand::Models::SessionObserveParams::Options::Variable::UnionMember3}?
Variables whose names are exposed to the model so observe() returns %variableName% placeholders in suggested action arguments instead of literal values. Accepts flat primitives or { value, description? } objects.
79 80 |
# File 'lib/stagehand/models/session_observe_params.rb', line 79 optional :variables, -> { Stagehand::Internal::Type::HashOf[union: Stagehand::SessionObserveParams::Options::Variable] } |
Class Method Details
.variants ⇒ Array(Stagehand::Models::ModelConfig, String)
|
|
# File 'lib/stagehand/models/session_observe_params.rb', line 104
|