what an open search findsa forumthe citythe ministrya blogan old copya news siteonly the sitesyou namewhat the assistant quotesthe passage, word for wordwith the page and its datea forum post is never searched
The run in 4 steps
Name the sites that count
allowed_domains is a hard filter: only results on these sites are in the list. An entry can be a domain, every domain with one ending such as .gov, or the start of an address. source_kinds narrows the list further to sites that a public body publishes.
The policy of a key can set the allowed sites for every call. An assistant that runs under such a key cannot search another site, whatever its prompt says.
Get the passages in one call
Send the resident’s question in several wordings and in each official language.contents fetches the first 3 results in the same call and finds the passages for the question in each.
Request body of search
CITY_DOMAIN and MINISTRY_DOMAIN with the domains of the official sites.
Show the passage with its date
Each of the 3 pages comes back as a record with the passages that bear on each question, and with the facts of the page. This part of one record is cut to the fields that an answer shows.Part of the response