Class: ContextDev::Models::WebSearchParams::MarkdownOptions

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/web_search_params.rb

Defined Under Namespace

Classes: Pdf

Instance Attribute Summary collapse

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(enabled: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil) ⇒ Object

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

Inline Markdown scraping for each result. Set ‘enabled: true` to activate.

Parameters:

  • enabled (Boolean) (defaults to: nil)

    Scrape each result to Markdown. Off by default to keep search cheap and fast.

  • include_frames (Boolean) (defaults to: nil)

    Render iframe contents into the Markdown.

  • include_images (Boolean) (defaults to: nil)

    Emit image references in the Markdown.

  • include_links (Boolean) (defaults to: nil)

    Keep hyperlinks in the Markdown.

  • max_age_ms (Integer) (defaults to: nil)

    Cache TTL in ms for scraped Markdown keyed by URL + options. Default 1 day, max

  • pdf (ContextDev::Models::WebSearchParams::MarkdownOptions::Pdf) (defaults to: nil)

    PDF handling. Use start/end to bound text extraction and OCR to a page range.

  • shorten_base64_images (Boolean) (defaults to: nil)

    Truncate inline base64 image payloads to keep responses small.

  • timeout_ms (Integer) (defaults to: nil)

    Optional timeout in milliseconds for the request. If the request takes longer th

  • use_main_content_only (Boolean) (defaults to: nil)

    Strip nav, header, footer, and sidebar — keep only the primary article content.

  • wait_for_ms (Integer) (defaults to: nil)

    Extra wait after page load before rendering, in ms (0–30000). Useful for JS-heav



# File 'lib/context_dev/models/web_search_params.rb', line 156

Instance Attribute Details

#enabledBoolean?

Scrape each result to Markdown. Off by default to keep search cheap and fast.

Returns:

  • (Boolean, nil)


96
# File 'lib/context_dev/models/web_search_params.rb', line 96

optional :enabled, ContextDev::Internal::Type::Boolean

#include_framesBoolean?

Render iframe contents into the Markdown.

Returns:

  • (Boolean, nil)


102
# File 'lib/context_dev/models/web_search_params.rb', line 102

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

#include_imagesBoolean?

Emit image references in the Markdown.

Returns:

  • (Boolean, nil)


108
# File 'lib/context_dev/models/web_search_params.rb', line 108

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

Keep hyperlinks in the Markdown.

Returns:

  • (Boolean, nil)


114
# File 'lib/context_dev/models/web_search_params.rb', line 114

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

#max_age_msInteger?

Cache TTL in ms for scraped Markdown keyed by URL + options. Default 1 day, max 30 days. Set to 0 to force a fresh scrape.

Returns:

  • (Integer, nil)


121
# File 'lib/context_dev/models/web_search_params.rb', line 121

optional :max_age_ms, Integer, api_name: :maxAgeMs

#pdfContextDev::Models::WebSearchParams::MarkdownOptions::Pdf?

PDF handling. Use start/end to bound text extraction and OCR to a page range.



127
# File 'lib/context_dev/models/web_search_params.rb', line 127

optional :pdf, -> { ContextDev::WebSearchParams::MarkdownOptions::Pdf }

#shorten_base64_imagesBoolean?

Truncate inline base64 image payloads to keep responses small.

Returns:

  • (Boolean, nil)


133
# File 'lib/context_dev/models/web_search_params.rb', line 133

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

#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)


141
# File 'lib/context_dev/models/web_search_params.rb', line 141

optional :timeout_ms, Integer, api_name: :timeoutMS

#use_main_content_onlyBoolean?

Strip nav, header, footer, and sidebar — keep only the primary article content.

Returns:

  • (Boolean, nil)


147
# File 'lib/context_dev/models/web_search_params.rb', line 147

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

#wait_for_msInteger?

Extra wait after page load before rendering, in ms (0–30000). Useful for JS-heavy pages.

Returns:

  • (Integer, nil)


154
# File 'lib/context_dev/models/web_search_params.rb', line 154

optional :wait_for_ms, Integer, api_name: :waitForMs