Web Search
The retrieval.webSearch
executes a web search using the Bing Web Search API.
Web Pages
By default, the API returns the first 10 web pages in the webPages
field
as an array of files, similarly to env.files
. The content contains
the summary snippet returned by the search engine.
You can use fetchText
to download the full content of the web page.
Bing Web Search configuration
The API uses Bing Web Search v7 to search the web. To use the API, you need to create a Bing Web Search resource in the Azure portal and store the API key in the .env
file.
Tool
Add the system.retrieval_web_search system script to register a tool that uses retrieval.webSearch
.