Class: ContextDev::Models::WebWebScrapeMdParams

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

Overview

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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(url:, include_images: nil, include_links: nil, max_age_ms: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::WebWebScrapeMdParams for more details.

Parameters:

  • url (String)

    Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr

  • include_images (Boolean) (defaults to: nil)

    Include image references in Markdown output

  • include_links (Boolean) (defaults to: nil)

    Preserve hyperlinks in Markdown output

  • max_age_ms (Integer) (defaults to: nil)

    Return a cached result if a prior scrape for the same parameters exists and is y

  • shorten_base64_images (Boolean) (defaults to: nil)

    Shorten base64-encoded image data in the Markdown output

  • use_main_content_only (Boolean) (defaults to: nil)

    Extract only the main content of the page, excluding headers, footers, sidebars,

  • request_options (ContextDev::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/context_dev/models/web_web_scrape_md_params.rb', line 50

Instance Attribute Details

#include_imagesBoolean?

Include image references in Markdown output

Returns:

  • (Boolean, nil)


21
# File 'lib/context_dev/models/web_web_scrape_md_params.rb', line 21

optional :include_images, ContextDev::Internal::Type::Boolean

Preserve hyperlinks in Markdown output

Returns:

  • (Boolean, nil)


27
# File 'lib/context_dev/models/web_web_scrape_md_params.rb', line 27

optional :include_links, ContextDev::Internal::Type::Boolean

#max_age_msInteger?

Return a cached result if a prior scrape for the same parameters exists and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.

Returns:

  • (Integer, nil)


35
# File 'lib/context_dev/models/web_web_scrape_md_params.rb', line 35

optional :max_age_ms, Integer

#shorten_base64_imagesBoolean?

Shorten base64-encoded image data in the Markdown output

Returns:

  • (Boolean, nil)


41
# File 'lib/context_dev/models/web_web_scrape_md_params.rb', line 41

optional :shorten_base64_images, ContextDev::Internal::Type::Boolean

#urlString

Full URL to scrape into LLM usable Markdown (must include http:// or https:// protocol)

Returns:

  • (String)


15
# File 'lib/context_dev/models/web_web_scrape_md_params.rb', line 15

required :url, String

#use_main_content_onlyBoolean?

Extract only the main content of the page, excluding headers, footers, sidebars, and navigation

Returns:

  • (Boolean, nil)


48
# File 'lib/context_dev/models/web_web_scrape_md_params.rb', line 48

optional :use_main_content_only, ContextDev::Internal::Type::Boolean