Module: LLM::OpenAI::Response::WebSearch
- Defined in:
- lib/llm/providers/openai/response/web_search.rb
Overview
The LLM::OpenAI::Response::WebSearch module provides methods for accessing web search results from a web search tool call made via the LLM::Provider#web_search method.
Instance Method Summary collapse
-
#search_results ⇒ Array<LLM::Object>
Returns one or more search results.
Instance Method Details
#search_results ⇒ Array<LLM::Object>
Returns one or more search results
13 14 15 16 17 18 19 |
# File 'lib/llm/providers/openai/response/web_search.rb', line 13 def search_results LLM::Object.from_hash( choices[0] .annotations .map { _1.slice(:title, :url) } ) end |