Class: Pikuri::Tool::Search::Result
- Inherits:
-
Data
- Object
- Data
- Pikuri::Tool::Search::Result
- Defined in:
- lib/pikuri/tool/search/result.rb
Overview
A single search hit from a Pikuri::Tool::Search provider (DuckDuckGo,
Brave, Exa). Providers return Array<Result>; Engines#search
concatenates them into the smolagents-style Markdown the LLM sees.
Structure split from rendering keeps the providers interchangeable —
they need only agree on these three fields (provider extras like scores
or dates are discarded, since no caller uses them).
Instance Attribute Summary collapse
-
#body ⇒ String
readonly
Plain-text snippet, possibly empty (an Exa navigational result with no highlights).
-
#title ⇒ String
readonly
Plain-text title, provider highlight markup (Brave's
<strong>, DuckDuckGo's<b>) already stripped. -
#url ⇒ String
readonly
Absolute URL of the hit.
Instance Attribute Details
#body ⇒ String (readonly)
Returns plain-text snippet, possibly empty (an Exa navigational result with no highlights).
21 |
# File 'lib/pikuri/tool/search/result.rb', line 21 Result = Data.define(:url, :title, :body) |
#title ⇒ String (readonly)
Returns plain-text title, provider highlight markup
(Brave's <strong>, DuckDuckGo's <b>) already stripped.
21 |
# File 'lib/pikuri/tool/search/result.rb', line 21 Result = Data.define(:url, :title, :body) |
#url ⇒ String (readonly)
Returns absolute URL of the hit.
21 |
# File 'lib/pikuri/tool/search/result.rb', line 21 Result = Data.define(:url, :title, :body) |