Class: Pikuri::Tool::Search::Result

Inherits:
Data
  • Object
show all
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

Instance Attribute Details

#bodyString (readonly)

Returns plain-text snippet, possibly empty (an Exa navigational result with no highlights).

Returns:

  • (String)

    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)

#titleString (readonly)

Returns plain-text title, provider highlight markup (Brave's <strong>, DuckDuckGo's <b>) already stripped.

Returns:

  • (String)

    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)

#urlString (readonly)

Returns absolute URL of the hit.

Returns:

  • (String)

    absolute URL of the hit



21
# File 'lib/pikuri/tool/search/result.rb', line 21

Result = Data.define(:url, :title, :body)