Class: ContextDev::Models::WebSearchResponse::Result
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ContextDev::Models::WebSearchResponse::Result
- Defined in:
- lib/context_dev/models/web_search_response.rb
Defined Under Namespace
Modules: Relevance Classes: Markdown
Instance Attribute Summary collapse
-
#description ⇒ String
Snippet excerpt from the page.
-
#markdown ⇒ ContextDev::Models::WebSearchResponse::Result::Markdown
Markdown scrape status and content for this result.
-
#relevance ⇒ Symbol, ContextDev::Models::WebSearchResponse::Result::Relevance
Relevance to the original query.
-
#title ⇒ String
Page title.
-
#url ⇒ String
Canonical result URL.
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
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/context_dev/models/web_search_response.rb', line 24 class Result < ContextDev::Internal::Type::BaseModel # @!attribute description # Snippet excerpt from the page. # # @return [String] required :description, String # @!attribute markdown # Markdown scrape status and content for this result. # # @return [ContextDev::Models::WebSearchResponse::Result::Markdown] required :markdown, -> { ContextDev::Models::WebSearchResponse::Result::Markdown } # @!attribute relevance # Relevance to the original query. # # @return [Symbol, ContextDev::Models::WebSearchResponse::Result::Relevance] required :relevance, enum: -> { ContextDev::Models::WebSearchResponse::Result::Relevance } # @!attribute title # Page title. # # @return [String] required :title, String # @!attribute url # Canonical result URL. # # @return [String] required :url, String # @!method initialize(description:, markdown:, relevance:, title:, url:) # @param description [String] Snippet excerpt from the page. # # @param markdown [ContextDev::Models::WebSearchResponse::Result::Markdown] Markdown scrape status and content for this result. # # @param relevance [Symbol, ContextDev::Models::WebSearchResponse::Result::Relevance] Relevance to the original query. # # @param title [String] Page title. # # @param url [String] Canonical result URL. # @see ContextDev::Models::WebSearchResponse::Result#markdown class Markdown < ContextDev::Internal::Type::BaseModel # @!attribute code # Per-result scrape outcome. Inspect this before reading `markdown`. # # @return [Symbol, ContextDev::Models::WebSearchResponse::Result::Markdown::Code] required :code, enum: -> { ContextDev::Models::WebSearchResponse::Result::Markdown::Code } # @!attribute markdown # GFM Markdown of the page. Null unless markdownOptions.enabled is true and # scraping succeeded. # # @return [String, nil] required :markdown, String, nil?: true # @!method initialize(code:, markdown:) # Some parameter documentations has been truncated, see # {ContextDev::Models::WebSearchResponse::Result::Markdown} for more details. # # Markdown scrape status and content for this result. # # @param code [Symbol, ContextDev::Models::WebSearchResponse::Result::Markdown::Code] Per-result scrape outcome. Inspect this before reading `markdown`. # # @param markdown [String, nil] GFM Markdown of the page. Null unless markdownOptions.enabled is true and scrapi # Per-result scrape outcome. Inspect this before reading `markdown`. # # @see ContextDev::Models::WebSearchResponse::Result::Markdown#code module Code extend ContextDev::Internal::Type::Enum SUCCESS = :SUCCESS NOT_REQUESTED = :NOT_REQUESTED TIMEOUT = :TIMEOUT WEBSITE_ACCESS_ERROR = :WEBSITE_ACCESS_ERROR ERROR = :ERROR # @!method self.values # @return [Array<Symbol>] end end # Relevance to the original query. # # @see ContextDev::Models::WebSearchResponse::Result#relevance module Relevance extend ContextDev::Internal::Type::Enum HIGH = :high MEDIUM = :medium LOW = :low # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#description ⇒ String
Snippet excerpt from the page.
29 |
# File 'lib/context_dev/models/web_search_response.rb', line 29 required :description, String |
#markdown ⇒ ContextDev::Models::WebSearchResponse::Result::Markdown
Markdown scrape status and content for this result.
35 |
# File 'lib/context_dev/models/web_search_response.rb', line 35 required :markdown, -> { ContextDev::Models::WebSearchResponse::Result::Markdown } |
#relevance ⇒ Symbol, ContextDev::Models::WebSearchResponse::Result::Relevance
Relevance to the original query.
41 |
# File 'lib/context_dev/models/web_search_response.rb', line 41 required :relevance, enum: -> { ContextDev::Models::WebSearchResponse::Result::Relevance } |
#title ⇒ String
Page title.
47 |
# File 'lib/context_dev/models/web_search_response.rb', line 47 required :title, String |
#url ⇒ String
Canonical result URL.
53 |
# File 'lib/context_dev/models/web_search_response.rb', line 53 required :url, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/context_dev/models/web_search_response.rb', line 103
|