api.newsroom.sgit.ai v0.2.14

Home / Search

Search · in your browser

Search

Every page of this site, searched in your browser; and asked, with Chrome’s built-in model or your own OpenRouter key, answered from the passages found. The component is this API’s own, loaded from this host’s release v0.2.5: the site eats what it serves.

How it works

There is no search server. When this site is built, site/build.py reads every page it writes and produces two files: docs.json, one entry per page with its title, teaser and headings, and text.json, the text in paragraphs with the section each is in. This page fetches them like any other file and ranks them here, in your browser, with assets/search/search.js from the release this host serves (BM25 over the fields and the paragraphs; a title counts for more than a word in the text). Quotes find an exact phrase. Searching sends nothing anywhere.

Ask searches the question the same way, takes the best paragraph of each of the top pages, numbers them and gives them to a model with one instruction: answer only from them, cite them by number, and say so when they do not hold the answer. Chrome’s built-in model runs on your machine; your own OpenRouter key is sent to openrouter.ai only. The format of the two files is a contract of this API; the newsroom’s own index is built the same way.