Class: ContextDev::Models::WebExtractParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/context_dev/models/web_extract_params.rb

Overview

Defined Under Namespace

Classes: Pdf

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Method Summary

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, #initialize, 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

This class inherits a constructor from ContextDev::Internal::Type::BaseModel

Instance Attribute Details

#fact_checkBoolean?

When true (default), every returned value must be grounded in facts stated on the page; fields that cannot be supported by the page are returned as null/empty. When false, the model may make reasonable inferences and derivations from the page content (e.g. ideal customer, competitor analysis, recommendations) while keeping verifiable specifics (names, quotes, URLs, dates, metrics) faithful to the source.

Returns:

  • (Boolean, nil)


34
# File 'lib/context_dev/models/web_extract_params.rb', line 34

optional :fact_check, ContextDev::Internal::Type::Boolean, api_name: :factCheck

#follow_subdomainsBoolean?

When true, follow links on subdomains of the starting URL’s domain.

Returns:

  • (Boolean, nil)


40
# File 'lib/context_dev/models/web_extract_params.rb', line 40

optional :follow_subdomains, ContextDev::Internal::Type::Boolean, api_name: :followSubdomains

#include_framesBoolean?

When true, iframe contents are included in Markdown before extraction.

Returns:

  • (Boolean, nil)


46
# File 'lib/context_dev/models/web_extract_params.rb', line 46

optional :include_frames, ContextDev::Internal::Type::Boolean, api_name: :includeFrames

#instructionsString?

Optional extraction guidance, such as which facts to prioritize or how to interpret fields in the schema.

Returns:

  • (String, nil)


53
# File 'lib/context_dev/models/web_extract_params.rb', line 53

optional :instructions, String

#max_age_msInteger?

Return cached scrape results if a prior scrape for the same parameters is younger than this many milliseconds.

Returns:

  • (Integer, nil)


60
# File 'lib/context_dev/models/web_extract_params.rb', line 60

optional :max_age_ms, Integer, api_name: :maxAgeMs

#pdfContextDev::Models::WebExtractParams::Pdf?



65
# File 'lib/context_dev/models/web_extract_params.rb', line 65

optional :pdf, -> { ContextDev::WebExtractParams::Pdf }

#schemaHash{Symbol=>Object}

JSON Schema for the returned data object. TypeScript Zod users can pass a JSON Schema generated from a Zod object; Python users can pass the equivalent JSON Schema object.

Returns:

  • (Hash{Symbol=>Object})


16
# File 'lib/context_dev/models/web_extract_params.rb', line 16

required :schema, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]

#stop_after_msInteger?

Soft time budget for the crawl in milliseconds.

Returns:

  • (Integer, nil)


71
# File 'lib/context_dev/models/web_extract_params.rb', line 71

optional :stop_after_ms, Integer, api_name: :stopAfterMs

#timeout_msInteger?

Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).

Returns:

  • (Integer, nil)


79
# File 'lib/context_dev/models/web_extract_params.rb', line 79

optional :timeout_ms, Integer, api_name: :timeoutMS

#urlString

The starting website URL to crawl and extract from. Must include http:// or https://.

Returns:

  • (String)


23
# File 'lib/context_dev/models/web_extract_params.rb', line 23

required :url, String

#wait_for_msInteger?

Optional browser wait time in milliseconds after initial page load for each crawled page.

Returns:

  • (Integer, nil)


86
# File 'lib/context_dev/models/web_extract_params.rb', line 86

optional :wait_for_ms, Integer, api_name: :waitForMs