Class: Stagehand::Models::SessionExtractParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/stagehand/models/session_extract_params.rb,
sig/stagehand/models/session_extract_params.rbs

Overview

See Also:

  • Stagehand::Resources::Sessions#extract
  • Stagehand::Resources::Sessions#extract_streaming

Defined Under Namespace

Modules: XStreamResponse Classes: Options

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::Stagehand

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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 ⇒ Object



42
# File 'sig/stagehand/models/session_extract_params.rbs', line 42

def initialize: (

Instance Attribute Details

#frame_id ⇒ String?

Target frame ID for the extraction

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


22
# File 'lib/stagehand/models/session_extract_params.rb', line 22

optional :frame_id, String, api_name: :frameId, nil?: true

#id ⇒ String

Unique session identifier

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/stagehand/models/session_extract_params.rb', line 16

required :id, String

#instruction ⇒ String?

Natural language instruction for what to extract

Parameters:

  • (String)

Returns:

  • (String, nil)


28
# File 'lib/stagehand/models/session_extract_params.rb', line 28

optional :instruction, String

#options ⇒ Stagehand::Models::SessionExtractParams::Options?



33
# File 'lib/stagehand/models/session_extract_params.rb', line 33

optional :options, -> { Stagehand::SessionExtractParams::Options }

#schema ⇒ Hash{Symbol=>Object}?

JSON Schema defining the structure of data to extract

Parameters:

  • (::Hash[Symbol, top])

Returns:

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


39
# File 'lib/stagehand/models/session_extract_params.rb', line 39

optional :schema, Stagehand::Internal::Type::HashOf[Stagehand::Internal::Type::Unknown]

#x_stream_response ⇒ Symbol, ...

Whether to stream the response via SSE



45
# File 'lib/stagehand/models/session_extract_params.rb', line 45

optional :x_stream_response, enum: -> { Stagehand::SessionExtractParams::XStreamResponse }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stagehand/models/session_extract_params.rb', line 440


.variants ⇒ Array(Stagehand::Models::SessionExtractParams::Options::Model::VertexModelConfigObject, Stagehand::Models::SessionExtractParams::Options::Model::GenericModelConfigObject, String)



# File 'lib/stagehand/models/session_extract_params.rb', line 445


Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


52
# File 'sig/stagehand/models/session_extract_params.rbs', line 52

def to_hash: -> {