Class: ContextDev::Models::WebSearchParams

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

Overview

Defined Under Namespace

Modules: Freshness Classes: MarkdownOptions

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(query:, exclude_domains: nil, freshness: nil, include_domains: nil, markdown_options: nil, query_fanout: nil, timeout_ms: nil, request_options: {}) ⇒ Object

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

Parameters:

  • query (String)

    Natural-language search query.

  • exclude_domains (Array<String>) (defaults to: nil)

    Blocklist — drop results from these domains. Example: [“pinterest.com”, “reddit.

  • freshness (Symbol, ContextDev::Models::WebSearchParams::Freshness) (defaults to: nil)

    Restrict results to content published within this window.

  • include_domains (Array<String>) (defaults to: nil)

    Allowlist — only return results from these domains. Example: [“arxiv.org”, “gith

  • markdown_options (ContextDev::Models::WebSearchParams::MarkdownOptions) (defaults to: nil)

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

  • query_fanout (Boolean) (defaults to: nil)

    Expand the query into multiple parallel variants for broader recall.

  • timeout_ms (Integer) (defaults to: nil)

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

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


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

Instance Attribute Details

#exclude_domainsArray<String>?

Blocklist — drop results from these domains. Example: [“pinterest.com”, “reddit.com”].

Returns:

  • (Array<String>, nil)


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

optional :exclude_domains, ContextDev::Internal::Type::ArrayOf[String], api_name: :excludeDomains

#freshnessSymbol, ...

Restrict results to content published within this window.



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

optional :freshness, enum: -> { ContextDev::WebSearchParams::Freshness }

#include_domainsArray<String>?

Allowlist — only return results from these domains. Example: [“arxiv.org”, “github.com”].

Returns:

  • (Array<String>, nil)


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

optional :include_domains, ContextDev::Internal::Type::ArrayOf[String], api_name: :includeDomains

#markdown_optionsContextDev::Models::WebSearchParams::MarkdownOptions?

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



40
41
42
# File 'lib/context_dev/models/web_search_params.rb', line 40

optional :markdown_options,
-> { ContextDev::WebSearchParams::MarkdownOptions },
api_name: :markdownOptions

#queryString

Natural-language search query.

Returns:

  • (String)


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

required :query, String

#query_fanoutBoolean?

Expand the query into multiple parallel variants for broader recall.

Returns:

  • (Boolean, nil)


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

optional :query_fanout, ContextDev::Internal::Type::Boolean, api_name: :queryFanout

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


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

optional :timeout_ms, Integer, api_name: :timeoutMS

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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