Class: ContextDev::Models::WebSearchResponse::Result

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/web_search_response.rb,
sig/context_dev/models/web_search_response.rbs

Defined Under Namespace

Modules: Relevance Classes: Markdown

Instance Attribute Summary collapse

Class Method 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(description:, markdown:, relevance:, title:, url:) ⇒ Object

Parameters:



# File 'lib/context_dev/models/web_search_response.rb', line 120

Instance Attribute Details

#descriptionString

Snippet excerpt from the page.

Parameters:

  • value (String)

Returns:

  • (String)


94
# File 'lib/context_dev/models/web_search_response.rb', line 94

required :description, String

#markdownContextDev::Models::WebSearchResponse::Result::Markdown

Markdown scrape status and content for this result.



100
# File 'lib/context_dev/models/web_search_response.rb', line 100

required :markdown, -> { ContextDev::Models::WebSearchResponse::Result::Markdown }

#relevanceSymbol, ContextDev::Models::WebSearchResponse::Result::Relevance

Relevance to the original query.

Parameters:

  • value (ContextDev::Models::WebSearchResponse::Result::relevance)

Returns:



106
# File 'lib/context_dev/models/web_search_response.rb', line 106

required :relevance, enum: -> { ContextDev::Models::WebSearchResponse::Result::Relevance }

#titleString

Page title.

Parameters:

  • value (String)

Returns:

  • (String)


112
# File 'lib/context_dev/models/web_search_response.rb', line 112

required :title, String

#urlString

Canonical result URL.

Parameters:

  • value (String)

Returns:

  • (String)


118
# File 'lib/context_dev/models/web_search_response.rb', line 118

required :url, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/web_search_response.rb', line 169

Instance Method Details

#to_hash{

Returns:

  • ({)


100
# File 'sig/context_dev/models/web_search_response.rbs', line 100

def to_hash: -> {