Class: ContextDev::Models::WebSearchParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ContextDev::Models::WebSearchParams
- 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: Country, Freshness Classes: MarkdownOptions
Instance Attribute Summary collapse
-
#country ⇒ Symbol, ...
Two-letter ISO 3166-1 alpha-2 country code to localize results to a specific country (maps to Google’s ‘gl` parameter).
-
#exclude_domains ⇒ Array<String>?
Blocklist — drop results from these domains.
-
#freshness ⇒ Symbol, ...
Restrict results to content published within this window.
-
#include_domains ⇒ Array<String>?
Allowlist — only return results from these domains.
-
#markdown_options ⇒ ContextDev::Models::WebSearchParams::MarkdownOptions?
Inline Markdown scraping for each result.
-
#num_results ⇒ Integer?
Number of results to request and return (10–100).
-
#query ⇒ String
Search query.
-
#query_fanout ⇒ Boolean?
Expand the query into multiple parallel variants for broader recall.
-
#timeout_ms ⇒ Integer?
Optional timeout in milliseconds for the request.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(query:, country: nil, exclude_domains: nil, freshness: nil, include_domains: nil, markdown_options: nil, num_results: nil, query_fanout: nil, timeout_ms: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see WebSearchParams for more details.
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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:, country: nil, exclude_domains: nil, freshness: nil, include_domains: nil, markdown_options: nil, num_results: nil, query_fanout: nil, timeout_ms: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see ContextDev::Models::WebSearchParams for more details.
|
|
# File 'lib/context_dev/models/web_search_params.rb', line 72
|
Instance Attribute Details
#country ⇒ Symbol, ...
Two-letter ISO 3166-1 alpha-2 country code to localize results to a specific country (maps to Google’s ‘gl` parameter). Example: “us”, “gb”, “de”.
22 |
# File 'lib/context_dev/models/web_search_params.rb', line 22 optional :country, enum: -> { ContextDev::WebSearchParams::Country } |
#exclude_domains ⇒ Array<String>?
Blocklist — drop results from these domains. Example: [“pinterest.com”, “reddit.com”].
29 |
# File 'lib/context_dev/models/web_search_params.rb', line 29 optional :exclude_domains, ContextDev::Internal::Type::ArrayOf[String], api_name: :excludeDomains |
#freshness ⇒ Symbol, ...
Restrict results to content published within this window.
35 |
# File 'lib/context_dev/models/web_search_params.rb', line 35 optional :freshness, enum: -> { ContextDev::WebSearchParams::Freshness } |
#include_domains ⇒ Array<String>?
Allowlist — only return results from these domains. Example: [“arxiv.org”, “github.com”].
42 |
# File 'lib/context_dev/models/web_search_params.rb', line 42 optional :include_domains, ContextDev::Internal::Type::ArrayOf[String], api_name: :includeDomains |
#markdown_options ⇒ ContextDev::Models::WebSearchParams::MarkdownOptions?
Inline Markdown scraping for each result. Set ‘enabled: true` to activate.
48 49 50 |
# File 'lib/context_dev/models/web_search_params.rb', line 48 optional :markdown_options, -> { ContextDev::WebSearchParams::MarkdownOptions }, api_name: :markdownOptions |
#num_results ⇒ Integer?
Number of results to request and return (10–100). Defaults to 10.
56 |
# File 'lib/context_dev/models/web_search_params.rb', line 56 optional :num_results, Integer, api_name: :numResults |
#query ⇒ String
Search query. Accepts natural language as well as Google-style search operators such as ‘site:`, `-site:`, `inurl:`, `intitle:`, quoted phrases, and `OR`.
15 |
# File 'lib/context_dev/models/web_search_params.rb', line 15 required :query, String |
#query_fanout ⇒ Boolean?
Expand the query into multiple parallel variants for broader recall.
62 |
# File 'lib/context_dev/models/web_search_params.rb', line 62 optional :query_fanout, ContextDev::Internal::Type::Boolean, api_name: :queryFanout |
#timeout_ms ⇒ Integer?
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).
70 |
# File 'lib/context_dev/models/web_search_params.rb', line 70 optional :timeout_ms, Integer, api_name: :timeoutMS |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/context_dev/models/web_search_params.rb', line 341
|