class Riffer::StreamEvents::WebSearchDone
Represents the result of a web search during streaming.
Emitted when the LLM has finished a server-side web search.
Attributes
The search query used.
The search result sources with title and url.
Public Class Methods
Source
# File lib/riffer/stream_events/web_search_done.rb, line 15 def initialize(query, sources: [], role: :assistant) super(role: role) @query = query @sources = sources end
: (String, ?sources: Array[Hash[Symbol, String?]], ?role: Symbol) -> void
Calls superclass method
Riffer::StreamEvents::Base::new
Public Instance Methods
Source
# File lib/riffer/stream_events/web_search_done.rb, line 22 def to_h {role: @role, query: @query, sources: @sources} end
: () -> Hash[Symbol, untyped]